Files
lcdproc/scripts/debian/lcdproc.lcdvc.init
T

53 lines
970 B
Bash

#! /bin/sh
#
# /etc/init.d/lcdvc lcdvc client starting and stopping
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/lcdvc
NAME=lcdvc
DESC="lcdvc virtual console daemon"
DEFAULTS=/etc/default/$NAME
# 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
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet \
--exec $DAEMON -- $OPTIONS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --quiet \
--exec $DAEMON
echo "$NAME."
;;
restart|reload|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0