diff --git a/run-vsftpd.sh b/run-vsftpd.sh index 9ec8616..5d9656f 100644 --- a/run-vsftpd.sh +++ b/run-vsftpd.sh @@ -21,7 +21,10 @@ fi mkdir -p "/home/vsftpd/${FTP_USER}" chown -R ftp:ftp /home/vsftpd/ -echo -e "${FTP_USER}\n${FTP_PASS}" > /etc/vsftpd/virtual_users.txt +if ! grep -Fxq "${FTP_USER}" /etc/vsftpd/virtual_users.txt +then + echo -e "${FTP_USER}\n${FTP_PASS}" >> /etc/vsftpd/virtual_users.txt +fi /usr/bin/db_load -T -t hash -f /etc/vsftpd/virtual_users.txt /etc/vsftpd/virtual_users.db # Set passive mode parameters: