#!/bin/sh #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k #%start: 23 #%stop: 47 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source $rc_functions if [ ! -e /etc/vsftpd.conf ] then echo echo -e ${COLYELLOW}"Please setup your /etc/vsftpd.conf. Aborted." echo exit 1 else source /etc/vsftpd.conf if [ "${listen}" != "YES" -o "${background}" != "YES" ] then echo echo -e ${COLYELLOW}"Please setup vsftpd for standalone mode," echo -e ${COLYELLOW}"or start it via (x)inetd. Aborted." echo exit 1 fi fi case "$1" in start) echo -e ${COLOREDSTAR}"Starting vsftpd daemon ..." start-stop-daemon --start --quiet \ --exec /usr/sbin/vsftpd /etc/vsftpd.conf evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Stopping vsftpd daemon ..." start-stop-daemon --stop --quiet --exec /usr/sbin/vsftpd evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc vsftpd ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac