]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/thttpd/files/init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / thttpd / files / init
1 #! /bin/sh 
2 #
3 # This is an init script for openembedded
4 # Copy it to /etc/init.d/thttpd and type
5 # > update-rc.d thttpd defaults 60
6 #
7
8
9 thttpd=/usr/sbin/thttpd
10 test -x "$thttpd" || exit 0
11
12
13 case "$1" in
14   start)
15     echo -n "Starting thttpd"
16     start-stop-daemon --start --quiet --exec $thttpd -- -d @@SRVDIR
17     echo "."
18     ;;
19   stop)
20     echo -n "Stopping thttpd"
21     start-stop-daemon --stop --quiet --exec $thttpd
22     echo "."
23     ;;
24   reload|force-reload)
25     start-stop-daemon --stop --quiet --signal 1 --exec $thttpd 
26     ;;
27   restart)
28     echo -n "Stopping thttpd"
29     start-stop-daemon --stop --quiet --exec $thttpd -- -d @@SRVDIR
30     echo "."
31     echo -n "Waiting for thttpd to die off"
32     for i in 1 2 3 ;
33     do
34         sleep 1
35         echo -n "."
36     done
37     echo ""
38     echo -n "Starting thttpd"
39     start-stop-daemon --start --quiet --exec $thttpd -- -d @@SRVDIR
40     echo "."
41     ;;
42   *)
43     echo "Usage: /etc/init.d/thttpd {start|stop|reload|restart|force-reload}"
44     exit 1
45 esac
46
47 exit 0