#!/bin/sh #--- import colors and init-funcs --- . /usr/lib/init/colors.sh . /usr/lib/init/init-funcs.sh #------------------------------------ start() { notify "Starting ftpd" tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftp &>/dev/null & check $? "start ftpd" echo $(pgrep tcpsvd) > /var/run/ftpd.pid return $? } stop() { notify "Stopping ftpd" kill $(cat /var/run/ftpd.pid) check $? "stop ftpd" rm /var/run/ftpd.pid &> /dev/null return $? } case "$1" in start|stop|restart|reload|help) "$1" ;; *) help return 1 esac return $?