2
# rebuildd-httpd init script
5
# Provides: rebuildd-httpd
6
# Required-Start: $remote_fs $network
7
# Required-Stop: $remote_fs $network
10
# Default-Start: 2 3 4 5
12
# Short-Description: rebuild daemon Web server
13
# Description: daemon providing Web interface to
14
# rebuild system for Debian packages
17
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
18
DAEMON=/usr/sbin/rebuildd-httpd
20
DESC="rebuild daemon HTTP server"
22
test -x $DAEMON || exit 0
24
# Include rebuildd defaults if available
25
if [ -f /etc/default/rebuildd ] ; then
26
. /etc/default/rebuildd
29
test "$START_REBUILDD_HTTPD" = 1 || exit 0
31
. /lib/lsb/init-functions
37
log_daemon_msg "Starting $DESC" "$NAME"
38
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
39
--background --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
43
log_daemon_msg "Stopping $DESC" "$NAME"
44
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$NAME.pid
49
# If the daemon can reload its config files on the fly
50
# for example by sending it SIGHUP, do it here.
52
# If the daemon responds to changes in its config file
53
# directly anyway, make this a do-nothing entry.
55
# echo "Reloading $DESC configuration files."
56
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
57
# /var/run/$NAME.pid --exec $DAEMON
61
# If the "reload" option is implemented, move the "force-reload"
62
# option to the "reload" entry above. If not, "force-reload" is
63
# just the same as "restart" except that it does nothing if the
64
# daemon isn't already running.
65
# check wether $DAEMON is running. If so, restart
66
start-stop-daemon --stop --test --quiet --pidfile \
67
/var/run/$NAME.pid --exec $DAEMON \
72
log_daemon_msg "Restarting $DESC" "$NAME"
73
start-stop-daemon --stop --quiet --pidfile \
74
/var/run/$NAME.pid --exec $DAEMON
76
start-stop-daemon --start --quiet --pidfile \
77
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
82
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
83
echo "Usage: $N {start|stop|restart|force-reload}" >&2