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 # See how we were called.
29 # Check if the service is already running?
30 if [ ! -f /var/lock/subsys/vsftpd ]; then
31 # Check if we have 'Listen=yes' in config
32 if ! egrep -q '^(listen|listen_ipv6)=([Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1)' /etc/vsftpd.conf; then
33 echo "error: Missing 'listen=yes' or 'listen_ipv6=yes' directive in /etc/vsftpd.conf!"
36 # try to load capability module
39 daemon --fork /usr/sbin/vsftpd
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vsftpd
43 msg_already_running vsftpd
48 if [ -f /var/lock/subsys/vsftpd ]; then
51 rm -f /var/lock/subsys/vsftpd > /dev/null 2>&1
53 msg_not_running vsftpd
62 msg_usage "$0 {start|stop|restart|force-reload}"