add init & default files for lcdexec & lcdvc
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user