1#! /bin/sh 2# 3# skeleton example file to build /etc/init.d/ scripts. 4# This file should be used to construct scripts for /etc/init.d. 5# 6# Written by Miquel van Smoorenburg <miquels@cistron.nl>. 7# Modified for Debian GNU/Linux 8# by Ian Murdock <imurdock@gnu.ai.mit.edu>. 9# 10# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl 11# 12# This file was automatically customized by dh-make on Sun, 17 Dec 2000 20:50:44 +0100 13 14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 15DAEMON=/usr/sbin/bftpd 16NAME=bftpd 17DESC="FTP Server" 18 19test -f $DAEMON || exit 0 20 21set -e 22 23case "$1" in 24 start) 25 echo -n "Starting $DESC: " 26 start-stop-daemon --start --quiet --exec $DAEMON -- -d 27 echo "$NAME." 28 ;; 29 stop) 30 echo -n "Stopping $DESC: " 31 start-stop-daemon --oknodo --stop --quiet --exec $DAEMON 32 echo "$NAME." 33 ;; 34#reload) 35 # 36 # If the daemon can reload its config files on the fly 37 # for example by sending it SIGHUP, do it here. 38 # 39 # If the daemon responds to changes in its config file 40 # directly anyway, make this a do-nothing entry. 41 # 42 # echo "Reloading $DESC configuration files." 43 # start-stop-daemon --stop --signal 1 --quiet --pidfile \ 44 # /var/run/$NAME.pid --exec $DAEMON 45 #;; 46 restart|force-reload) 47 # 48 # If the "reload" option is implemented, move the "force-reload" 49 # option to the "reload" entry above. If not, "force-reload" is 50 # just the same as "restart". 51 # 52 echo -n "Restarting $DESC: " 53 start-stop-daemon --oknodo --stop --quiet --exec $DAEMON 54 sleep 3 55 start-stop-daemon --start --quiet --exec $DAEMON -- -d 56 echo "$NAME." 57 ;; 58 *) 59 N=/etc/init.d/$NAME 60 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 61 echo "Usage: $N {start|stop|restart|force-reload}" >&2 62 exit 1 63 ;; 64esac 65 66exit 0 67