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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#! /bin/sh
### BEGIN INIT INFO
# Provides: lcdexec
# Required-Start: $syslog $local_fs $network $remote_fs
# Required-Stop: $syslog $local_fs $network $remote_fs
# Should-Start: LCDd
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: LCDproc program starter from the LCDd menu
# Description: LSB init script for lcdexec, the client to
# start programs from the LCDd menu in the LCDproc suite
### END INIT INFO
# local variables
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
etc=@sysconfdir@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=lcdexec
DAEMON=${bindir}/$NAME
DESC="LCDproc program starter"
DEFAULTS=/etc/default/$NAME
START=no
# Source defaults file; edit that file to configure this script.
if [ -e "${DEFAULTS}" ]; then
. "${DEFAULTS}"
fi
# If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then
exit 0
fi
# installation check
test -x $DAEMON || exit 5
# load LSB 3.x init functions
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
start_daemon $DAEMON $OPTIONS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
killproc $DAEMON
log_end_msg $?
;;
restart|reload|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 2
;;
esac
exit 0
|