From a5c47c3576959b284277e61fc874f0b95858c2bc Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 4 Jul 2014 01:17:04 +0300 Subject: [PATCH] Added FTP_SHELL controller --- bin/v-add-web-domain-ftp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index 129e3939d..72faef347 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -56,10 +56,14 @@ if [ ! -z "$FTP_USER" ]; then /usr/sbin/userdel -f $FTP_USER > /dev/null 2>&1 fi -# Define shell -shell='/sbin/nologin' -if [ -e "/usr/bin/rssh" ]; then - shell='/usr/bin/rssh' +# Define ftp user shell +if [ -z "$FTP_SHELL" ]; then + shell='/sbin/nologin' + if [ -e "/usr/bin/rssh" ]; then + shell='/usr/bin/rssh' + fi +else + shell=$FTP_SHELL fi # Define path