case "$1" in 'start') # Start the ProFTP daemon if [ -f /usr/local/sbin/proftpd ]; then echo "starting ProFTP daemon" /usr/local/sbin/proftpd & fi ;; 'stop') # Stop the ProFTP deamon PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep proftpd | /usr/bin/awk '{print $1}'` if [ ! -z "$PID" ] ; then /usr/bin/kill ${PID} >/dev/null 2>&1 echo "stoping ProFTP daemon" fi ;; *) echo "usage: /etc/init.d/proftpd {start|stop}" ;; esac exit 0