1st step towards a non-native package for Debian: copy debian/ below scripts/
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# /etc/init.d/lcdproc lcdproc client starting and stopping
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/bin/lcdproc
|
||||
NAME=lcdproc
|
||||
DESC="LCDproc client 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 --background \
|
||||
--exec $DAEMON -- -d $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
|
||||
Reference in New Issue
Block a user