conf/distro/jlime-donkey.conf : Added parted & Dialog to distro_rdepends
[vuplus_openembedded] / packages / boa / files / boa.init
1 #! /bin/sh
2 #
3 #               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
4 #               Modified for Debian GNU/Linux
5 #               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
6 #               Modified for boa by Bill Allombert <ballombe@debian.org>.
7
8 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
9 DAEMON=/usr/sbin/boa
10 NAME=boa
11 DESC="HTTP server"
12 LOGDIR="/var/log/$NAME"
13
14 test -x $DAEMON || exit 0
15
16 set -e
17
18 case "$1" in
19   start)
20         echo -n "Starting $DESC: $NAME"
21         if [ ! -d $LOGDIR ]; then
22                 mkdir -p $LOGDIR
23         fi
24         start-stop-daemon --start --quiet --exec $DAEMON
25         echo "."
26         ;;
27   stop)
28         echo -n "Stopping $DESC: $NAME"
29         start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
30         echo "."
31         ;;
32   restart)
33         echo -n "Restarting $DESC: $NAME"
34         start-stop-daemon --stop --signal HUP --quiet --oknodo --exec $DAEMON
35         echo "done."
36         ;;
37   reload)
38         #
39         #       If the daemon can reload its config files on the fly
40         #       for example by sending it SIGHUP, do it here.
41         #
42         #       If the daemon responds to changes in its config file
43         #       directly anyway, make this a do-nothing entry.
44         #
45         echo -n "Reloading $DESC configuration..."
46         start-stop-daemon --stop --signal 1 --quiet --oknodo --exec $DAEMON
47         echo "done."
48         ;;
49   *)
50         N=/etc/init.d/$NAME
51         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
52         echo "Usage: $N {start|stop|restart|reload}" >&2
53         exit 1
54         ;;
55 esac
56
57 exit 0