1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: lcdproc
# Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: LCDproc system status information viewer
# Description: Debian init script for lcdproc, the system
# status information viewer in the LCDproc suite
### END INIT INFO
# local variables
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
etc=@sysconfdir@
NAME=lcdproc
DAEMON=${bindir}/${NAME}
DESC="LCDproc system status monitor"
OPTIONS=""
# installation check
test -x ${DAEMON} || exit 0
case "$1" in
start)
printf "Starting ${DESC}: "
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
printf "${NAME}.\n"
;;
stop)
printf "Stopping ${DESC}: "
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
printf "${NAME}.\n"
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
exit 1
;;
esac
exit 0
|