mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
pasv_address triggers for vsftpd
This commit is contained in:
parent
c2ccccf142
commit
fa45276267
2 changed files with 72 additions and 2 deletions
48
bin/v-restart-ftp
Executable file
48
bin/v-restart-ftp
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue