2006-04-30 11:13:22 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
2006-10-06 16:07:18 +00:00
|
|
|
#### BEGIN INIT INFO
|
|
|
|
|
# Provides: lcdexec
|
|
|
|
|
# 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 program starter from the LCDd menu
|
|
|
|
|
# Description: Debian init script for lcdexec, the client to
|
|
|
|
|
# start programs from the LCDd menu in the LCDproc suite
|
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# local variables
|
|
|
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
2006-04-30 11:13:22 +00:00
|
|
|
DAEMON=/usr/bin/lcdexec
|
2006-06-05 08:35:51 +00:00
|
|
|
NAME=lcdexec
|
2006-10-06 16:07:18 +00:00
|
|
|
DESC="LCDproc program starter"
|
2006-04-30 11:13:22 +00:00
|
|
|
DEFAULTS=/etc/default/$NAME
|
|
|
|
|
|
|
|
|
|
# Source defaults file; edit that file to configure this script.
|
|
|
|
|
if [ -e "${DEFAULTS}" ]; then
|
2006-10-21 17:40:14 +00:00
|
|
|
. "${DEFAULTS}"
|
2006-04-30 11:13:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# If we're not to start the daemon, simply exit
|
|
|
|
|
if [ "${START}" != "yes" ]; then
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2006-10-06 16:46:57 +00:00
|
|
|
# installation check
|
|
|
|
|
test -x $DAEMON || exit 5
|
2006-04-30 11:13:22 +00:00
|
|
|
|
2006-10-06 16:07:18 +00:00
|
|
|
# load LSB 3.x init functions
|
|
|
|
|
. /lib/lsb/init-functions
|
2006-04-30 11:13:22 +00:00
|
|
|
|
2006-10-06 16:46:57 +00:00
|
|
|
|
2006-04-30 11:13:22 +00:00
|
|
|
case "$1" in
|
2006-10-21 17:40:14 +00:00
|
|
|
start)
|
2006-10-06 16:07:18 +00:00
|
|
|
log_daemon_msg "Starting $DESC" "$NAME"
|
|
|
|
|
start_daemon $DAEMON $OPTIONS
|
|
|
|
|
log_end_msg $?
|
2006-04-30 11:13:22 +00:00
|
|
|
;;
|
2006-10-21 17:40:14 +00:00
|
|
|
stop)
|
2006-10-06 16:07:18 +00:00
|
|
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
|
|
|
|
killproc $DAEMON
|
|
|
|
|
log_end_msg $?
|
2006-04-30 11:13:22 +00:00
|
|
|
;;
|
2006-10-21 17:40:14 +00:00
|
|
|
restart|reload|force-reload)
|
2006-04-30 11:13:22 +00:00
|
|
|
$0 stop
|
|
|
|
|
sleep 1
|
|
|
|
|
$0 start
|
|
|
|
|
;;
|
2006-10-21 17:40:14 +00:00
|
|
|
*)
|
2006-10-06 16:07:18 +00:00
|
|
|
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
2006-10-06 16:46:57 +00:00
|
|
|
exit 2
|
2006-04-30 11:13:22 +00:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
exit 0
|