Default gumstix configuration changed
[gumsense-br.git] / package / tftpd / init-tftpd
blob7f01462315c6d93b940088008cb6c3935bce032c
1 #! /bin/sh
3 # Author: Jaakko Niemi <liiwi@iki.fi>
4 # Modified from skeleton file in sarge
10 #Defaults for tftpd-hpa
11 RUN_DAEMON="yes"
12 OPTIONS="-l -s /var/lib/tftpboot"
17 set -e
19 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
20 DESC="HPA's tftpd"
21 NAME=in.tftpd
22 DAEMON=/usr/sbin/$NAME
23 PIDFILE=/var/run/$NAME.pid
24 SCRIPTNAME=/etc/init.d/S80tftpd-hpa
26 # Gracefully exit if the package has been removed.
27 test -x $DAEMON || exit 0
30 if [ "$RUN_DAEMON" != "yes" ] ; then
31 echo "tftpd-hpa disabled in /etc/init.d/S80tftpd-hpa"
32 exit 0
36 # Function that starts the daemon/service.
38 d_start() {
39 start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
43 # Function that stops the daemon/service.
45 d_stop() {
46 start-stop-daemon --stop --quiet --name $NAME
50 # Function that sends a SIGHUP to the daemon/service.
52 d_reload() {
53 start-stop-daemon --stop --quiet --name $NAME --signal 1
56 case "$1" in
57 start)
58 echo -n "Starting $DESC: $NAME"
59 d_start
60 echo "."
62 stop)
63 echo -n "Stopping $DESC: $NAME"
64 d_stop
65 echo "."
67 #reload)
69 # If the daemon can reload its configuration without
70 # restarting (for example, when it is sent a SIGHUP),
71 # then implement that here.
73 # If the daemon responds to changes in its config file
74 # directly anyway, make this an "exit 0".
76 # echo -n "Reloading $DESC configuration..."
77 # d_reload
78 # echo "done."
79 #;;
80 restart|force-reload)
82 # If the "reload" option is implemented, move the "force-reload"
83 # option to the "reload" entry above. If not, "force-reload" is
84 # just the same as "restart".
86 echo -n "Restarting $DESC: $NAME"
87 d_stop
88 sleep 1
89 d_start
90 echo "."
93 # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
94 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
95 exit 1
97 esac
99 exit 0