From a4eb470f59958192519f727c1fa533b250346419 Mon Sep 17 00:00:00 2001 From: marschap Date: Sun, 30 Apr 2006 11:13:22 +0000 Subject: [PATCH] add init & default files for lcdexec & lcdvc --- scripts/debian/lcdproc.lcdexec.default | 9 +++++ scripts/debian/lcdproc.lcdexec.init | 52 ++++++++++++++++++++++++++ scripts/debian/lcdproc.lcdvc.default | 9 +++++ scripts/debian/lcdproc.lcdvc.init | 52 ++++++++++++++++++++++++++ scripts/debian/rules | 6 ++- 5 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 scripts/debian/lcdproc.lcdexec.default create mode 100644 scripts/debian/lcdproc.lcdexec.init create mode 100644 scripts/debian/lcdproc.lcdvc.default create mode 100644 scripts/debian/lcdproc.lcdvc.init diff --git a/scripts/debian/lcdproc.lcdexec.default b/scripts/debian/lcdproc.lcdexec.default new file mode 100644 index 0000000..90fee91 --- /dev/null +++ b/scripts/debian/lcdproc.lcdexec.default @@ -0,0 +1,9 @@ +# /etc/default/lcdexec -- config file for lcdexec startup + +# shall lcdexec be started (yes/no) +START=no + +# options for lcdexec startup +#OPTIONS="" + +# EOF diff --git a/scripts/debian/lcdproc.lcdexec.init b/scripts/debian/lcdproc.lcdexec.init new file mode 100644 index 0000000..1e94e4a --- /dev/null +++ b/scripts/debian/lcdproc.lcdexec.init @@ -0,0 +1,52 @@ +#! /bin/sh +# +# /etc/init.d/lcdexec lcdexec client starting and stopping +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/lcdexec +NAME=lcdpexec +DESC="lcdexec progam starter 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 diff --git a/scripts/debian/lcdproc.lcdvc.default b/scripts/debian/lcdproc.lcdvc.default new file mode 100644 index 0000000..460dc80 --- /dev/null +++ b/scripts/debian/lcdproc.lcdvc.default @@ -0,0 +1,9 @@ +# /etc/default/lcdvc -- config file for lcdvc startup + +# shall lcdvc be started (yes/no) +START=no + +# options for lcdvc startup +#OPTIONS="" + +# EOF diff --git a/scripts/debian/lcdproc.lcdvc.init b/scripts/debian/lcdproc.lcdvc.init new file mode 100644 index 0000000..453ead4 --- /dev/null +++ b/scripts/debian/lcdproc.lcdvc.init @@ -0,0 +1,52 @@ +#! /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 --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 diff --git a/scripts/debian/rules b/scripts/debian/rules index 18d593c..2538824 100755 --- a/scripts/debian/rules +++ b/scripts/debian/rules @@ -83,7 +83,7 @@ install: build # trick: move samples into the correct directory # this saves us from patching Makefile.in files - for i in fortune.pl iosock.pl lcdexec lcdheadlines lcdmetar.pl tail.pl x11amp.pl ; do \ + for i in fortune.pl iosock.pl lcdheadlines lcdmetar.pl tail.pl x11amp.pl ; do \ mv $(CURDIR)/debian/lcdproc/usr/bin/$$i $(CURDIR)/debian/lcdproc/usr/share/doc/lcdproc/examples; \ done @@ -106,8 +106,10 @@ binary-arch: build install # dh_installemacsen # dh_installpam # dh_installmime - dh_installinit + dh_installinit # for the lcdproc client dh_installinit --name=LCDd + dh_installinit --name=lcdexec + dh_installinit --name=lcdvc # dh_installcron # dh_installinfo dh_installman docs/LCDd.8 docs/lcdproc.1