mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
added verification for not uniq ftp user account
This commit is contained in:
parent
ca23ae66d2
commit
729c384164
1 changed files with 7 additions and 1 deletions
|
@ -43,8 +43,14 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
|||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Get domain values
|
||||
get_domain_values 'web'
|
||||
check_ftp_user=$(grep "^$ftp_user:" /etc/passwd)
|
||||
if [ ! -z "$check_ftp_user" ] && [ "$FTP_USER" != "$ftp_user" ]; then
|
||||
echo "Error: ftp user $ftp_user already exists"
|
||||
log_event "$E_EXISTS $EVENT"
|
||||
exit $E_EXISTS
|
||||
fi
|
||||
|
||||
if [ ! -z "$FTP_USER" ]; then
|
||||
/usr/sbin/userdel $FTP_USER
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue