pasv_address triggers for vsftpd

This commit is contained in:
Serghey Rodin 2013-04-01 10:11:42 +03:00
commit fa45276267
2 changed files with 72 additions and 2 deletions

48
bin/v-restart-ftp Executable file
View file

@ -0,0 +1,48 @@
#!/bin/bash
# info: restart ftp service
# options: NONE
#
# The function tells ftp server to reread its configuration.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Includes
source $VESTA/conf/vesta.conf
source $VESTA/func/main.sh
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Vsftpd
if [ "$FTP_SYSTEM" = 'vsftpd' ]; then
/etc/init.d/vsftpd reload >/dev/null 2>&1
if [ $? -ne 0 ]; then
/etc/init.d/vsftpd restart >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
fi
fi
# ProFTPD
if [ "$FTP_SYSTEM" = 'proftpd' ]; then
/etc/init.d/proftpd reload >/dev/null 2>&1
if [ $? -ne 0 ]; then
/etc/init.d/proftpd restart >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
fi
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit