2002-05-28 12:48:05 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
2006-10-06 16:30:17 +00:00
|
|
|
#### BEGIN INIT INFO
|
|
|
|
|
# Provides: LCDd
|
|
|
|
|
# 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 Server Daemon
|
|
|
|
|
# Description: Debian init script for LCDd, the display
|
|
|
|
|
# server daemon in the LCDproc suite
|
|
|
|
|
### END INIT INFO
|
2002-05-28 12:48:05 +00:00
|
|
|
|
2006-10-21 20:01:42 +00:00
|
|
|
# local variables
|
2002-05-28 12:48:05 +00:00
|
|
|
prefix=@prefix@
|
|
|
|
|
exec_prefix=@exec_prefix@
|
|
|
|
|
bindir=@bindir@
|
|
|
|
|
sbindir=@sbindir@
|
|
|
|
|
etc=@sysconfdir@
|
|
|
|
|
|
2006-10-06 16:30:17 +00:00
|
|
|
NAME=LCDd
|
|
|
|
|
DAEMON=${sbindir}/${NAME}
|
2006-10-21 20:01:42 +00:00
|
|
|
DESC="LCDproc display server daemon"
|
2006-10-06 16:30:17 +00:00
|
|
|
OPTIONS=""
|
|
|
|
|
|
2006-10-21 20:01:42 +00:00
|
|
|
# installation check
|
2006-10-06 16:30:17 +00:00
|
|
|
test -x ${DAEMON} || exit 0
|
2002-05-28 12:48:05 +00:00
|
|
|
|
|
|
|
|
case "$1" in
|
2006-10-06 16:30:17 +00:00
|
|
|
start)
|
2006-10-21 20:01:42 +00:00
|
|
|
printf "Starting ${DESC}: "
|
|
|
|
|
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
|
2007-04-30 13:28:16 +00:00
|
|
|
printf "${NAME}.\n"
|
2006-10-21 20:01:42 +00:00
|
|
|
;;
|
2006-10-06 16:30:17 +00:00
|
|
|
stop)
|
2006-10-21 20:01:42 +00:00
|
|
|
printf "Stopping ${DESC}: "
|
|
|
|
|
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
|
2007-04-30 13:28:16 +00:00
|
|
|
printf "${NAME}.\n"
|
2006-10-21 20:01:42 +00:00
|
|
|
;;
|
2006-10-06 16:30:17 +00:00
|
|
|
restart|force-reload)
|
2006-10-21 20:01:42 +00:00
|
|
|
$0 stop
|
|
|
|
|
sleep 1
|
|
|
|
|
$0 start
|
|
|
|
|
;;
|
2006-10-06 16:30:17 +00:00
|
|
|
*)
|
2006-10-21 20:01:42 +00:00
|
|
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
2002-05-28 12:48:05 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
exit 0
|