6 # description: VSFTPD is a Very Secure FTP Daemon
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
15 # Check that networking is up.
16 if is_yes "${NETWORKING}"; then
17 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
18 msg_network_down vsftpd
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/vsftpd ]; then
28 # Check if we have 'Listen=yes' in config
29 if ! egrep -q '^(listen|listen_ipv6)=([Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1)' /etc/vsftpd/vsftpd.conf; then
30 echo "error: Missing 'listen=yes' or 'listen_ipv6=yes' directive in /etc/vsftpd/vsftpd.conf!"
33 # try to load capability module
36 daemon --fork /usr/sbin/vsftpd
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vsftpd
40 msg_already_running vsftpd
46 if [ -f /var/lock/subsys/vsftpd ]; then
49 rm -f /var/lock/subsys/vsftpd > /dev/null 2>&1
51 msg_not_running vsftpd
56 # See how we were called.
69 msg_usage "$0 {start|stop|restart|force-reload}"