4 # Required-Start: $local_fs $remote_fs $network $syslog $named
5 # Required-Stop: $local_fs $remote_fs $network $syslog $named
6 # Default-Start: 2 3 4 5
8 # Short-Description: Start/stop Baculum
9 # Description: Start the Baculum WebGUI Bacula Community tool.
10 # This script uses Lighttpd web server for working Baculum WebGUI tool.
13 DESC="Baculum WebGUI Bacula Community tool"
15 SCRIPTNAME=/etc/init.d/$NAME
16 DAEMON=/usr/sbin/lighttpd
17 DAEMON_OPTS="-f /etc/baculum/baculum-lighttpd.conf"
18 PIDFILE="/var/run/$NAME.pid"
20 test -x $DAEMON || exit 0
24 $DAEMON -t $DAEMON_OPTS > /dev/null || exit $?
27 . /lib/lsb/init-functions
32 log_daemon_msg "Starting $DESC" $NAME
33 if ! start-stop-daemon --start --oknodo --quiet \
34 --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
42 log_daemon_msg "Stopping $DESC" $NAME
43 if start-stop-daemon --stop --retry 30 --oknodo --quiet \
44 --pidfile $PIDFILE --exec $DAEMON
54 log_daemon_msg "Reloading $DESC configuration" $NAME
55 if start-stop-daemon --stop --signal INT --quiet \
56 --pidfile $PIDFILE --exec $DAEMON
59 if start-stop-daemon --start --quiet \
60 --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ; then
70 log_daemon_msg "Reopening $DESC logs" $NAME
71 if start-stop-daemon --stop --signal HUP --oknodo --quiet \
72 --pidfile $PIDFILE --exec $DAEMON
85 status_of_proc -p "$PIDFILE" "$DAEMON" lighttpd && exit 0 || exit $?
88 echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2