mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
force flag isn't required when admin group exists since it's there by default
This commit is contained in:
parent
7d11db2dd2
commit
561d7e9f01
2 changed files with 4 additions and 4 deletions
|
@ -260,7 +260,7 @@ if [ "x$(id -u)" != 'x0' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking admin user account
|
# Checking admin user account
|
||||||
if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
|
if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ -z "$force" ]; then
|
||||||
echo 'Please remove admin user account before proceeding.'
|
echo 'Please remove admin user account before proceeding.'
|
||||||
echo 'If you want to do it automatically run installer with -f option:'
|
echo 'If you want to do it automatically run installer with -f option:'
|
||||||
echo -e "Example: bash $0 --force\n"
|
echo -e "Example: bash $0 --force\n"
|
||||||
|
@ -1236,7 +1236,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
|
||||||
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
|
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
|
||||||
rm -f /tmp/sess_* >/dev/null 2>&1
|
rm -f /tmp/sess_* >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
|
if [ ! -z "$(grep ^admin: /etc/group)" ]; then
|
||||||
groupdel admin > /dev/null 2>&1
|
groupdel admin > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@ if [ "x$(id -u)" != 'x0' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking admin user account
|
# Checking admin user account
|
||||||
if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then
|
if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ -z "$force" ]; then
|
||||||
echo 'Please remove admin user account before proceeding.'
|
echo 'Please remove admin user account before proceeding.'
|
||||||
echo 'If you want to do it automatically run installer with -f option:'
|
echo 'If you want to do it automatically run installer with -f option:'
|
||||||
echo -e "Example: bash $0 --force\n"
|
echo -e "Example: bash $0 --force\n"
|
||||||
|
@ -1213,7 +1213,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
|
||||||
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
|
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
|
||||||
rm -f /tmp/sess_* >/dev/null 2>&1
|
rm -f /tmp/sess_* >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
|
if [ ! -z "$(grep ^admin: /etc/group)" ]; then
|
||||||
groupdel admin > /dev/null 2>&1
|
groupdel admin > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue