Files
ebusd/contrib/etc/init.d/ebusd.debian
T
Sven Giermann c6ad4bc546 Add Default-Stop to init script
Enabling the debian init-script reports the following warning:
> update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match ebusd Default-Stop values (none)

This change tells update-rc.d to stop this service on shutdown.
2015-11-23 12:19:49 +01:00

49 lines
1018 B
Bash
Executable File

#!/bin/sh
### BEGIN INIT INFO
# Provides: ebusd
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start ebusd
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
if test -f /etc/default/ebusd; then
. /etc/default/ebusd
fi
. /lib/lsb/init-functions
DAEMON=/usr/bin/ebusd
PIDFILE=/var/run/ebusd.pid
test -x $DAEMON || exit 5
case $1 in
start)
log_daemon_msg "Starting ebusd" "ebusd"
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $EBUSD_OPTS
status=$?
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping ebusd" "ebusd"
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
log_end_msg $?
rm -f $PIDFILE
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
status)
status_of_proc $DAEMON "ebusd"
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
;;
esac