Skip to content

Commit a5c47c3

Browse files
committed
Added FTP_SHELL controller
1 parent a06a90e commit a5c47c3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bin/v-add-web-domain-ftp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ if [ ! -z "$FTP_USER" ]; then
5656
/usr/sbin/userdel -f $FTP_USER > /dev/null 2>&1
5757
fi
5858

59-
# Define shell
60-
shell='/sbin/nologin'
61-
if [ -e "/usr/bin/rssh" ]; then
62-
shell='/usr/bin/rssh'
59+
# Define ftp user shell
60+
if [ -z "$FTP_SHELL" ]; then
61+
shell='/sbin/nologin'
62+
if [ -e "/usr/bin/rssh" ]; then
63+
shell='/usr/bin/rssh'
64+
fi
65+
else
66+
shell=$FTP_SHELL
6367
fi
6468

6569
# Define path

0 commit comments

Comments
 (0)