We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca23ae6 commit 729c384Copy full SHA for 729c384
bin/v-add-web-domain-ftp
@@ -43,8 +43,14 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
43
# Action #
44
#----------------------------------------------------------#
45
46
-# Get domain values
47
get_domain_values 'web'
+check_ftp_user=$(grep "^$ftp_user:" /etc/passwd)
48
+if [ ! -z "$check_ftp_user" ] && [ "$FTP_USER" != "$ftp_user" ]; then
49
+ echo "Error: ftp user $ftp_user already exists"
50
+ log_event "$E_EXISTS $EVENT"
51
+ exit $E_EXISTS
52
+fi
53
+
54
if [ ! -z "$FTP_USER" ]; then
55
/usr/sbin/userdel $FTP_USER
56
fi
0 commit comments