multiple ftp account support

This commit is contained in:
Serghey Rodin 2014-07-05 10:21:40 +03:00
commit d16a630566
6 changed files with 203 additions and 24 deletions

View file

@ -89,9 +89,15 @@ if [ ! -z "$STATS" ] && [ "$STATS" != 'no' ]; then
rm -f /etc/awstats/$STATS.$domain.conf
fi
# Deleting ftp account
# Deleting ftp users
if [ ! -z "$FTP_USER" ]; then
/usr/sbin/userdel -f $FTP_USER >> /dev/null 2>&1
for ftp_user in ${FTP_USER//:/ }; do
/usr/sbin/userdel $ftp_user >> /dev/null 2>&1
if [ "$?" != 0 ]; then
sed -i "/^$ftp_user:/d" /etc/passwd
sed -i "/^$ftp_user:/d" /etc/shadow
fi
done
fi
# Deleting directory