From 246eb132ccd23a20c58b9339f3c1c4f66f82c538 Mon Sep 17 00:00:00 2001 From: marschap Date: Fri, 6 Oct 2006 16:30:17 +0000 Subject: [PATCH] update Debian init script templates --- scripts/init-LCDd.debian.in | 55 +++++++++++++++++----------------- scripts/init-lcdproc.debian.in | 53 ++++++++++++++++---------------- 2 files changed, 53 insertions(+), 55 deletions(-) diff --git a/scripts/init-LCDd.debian.in b/scripts/init-LCDd.debian.in index 982646a..8e7900c 100644 --- a/scripts/init-LCDd.debian.in +++ b/scripts/init-LCDd.debian.in @@ -1,18 +1,15 @@ #!/bin/sh -e -# -# lcdd Startup script for LCDd -# -# Modified for autoconf -# by Rene Wagner -# Modified for lcd-server -# by Joris Robijn -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# -# Version: $Id$ -DESC="LCDd @VERSION@" +#### BEGIN INIT INFO +# Provides: LCDd +# Required-Start: $syslog $local_fs $network $remote_fs +# Required-Stop: $syslog $local_fs $network $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: LCDproc Server Daemon +# Description: Debian init script for LCDd, the display +# server daemon in the LCDproc suite +### END INIT INFO prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -20,30 +17,32 @@ bindir=@bindir@ sbindir=@sbindir@ etc=@sysconfdir@ -LCDd=${sbindir}/LCDd -configfile=${etc}/LCDd.conf +NAME=LCDd +DAEMON=${sbindir}/${NAME} +DESC="${NAME} @VERSION@" -test -x ${LCDd} || exit 0 +OPTIONS="" + + +test -x ${DAEMON} || exit 0 case "$1" in -start) - printf "Starting $DESC:" - start-stop-daemon --start --quiet --background --exec ${LCDd} -- -c ${configfile} - printf " LCDd" - printf ".\n" + start) + printf "Starting ${DESC}: " + start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS} + printf "${NAME}." ;; -stop) - printf "Stopping $DESC:" - start-stop-daemon --stop --oknodo --quiet --exec ${LCDd} - printf " LCDd" - printf ".\n" + stop) + printf "Stopping ${DESC}: " + start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON} + printf "${NAME}." ;; -restart | force-restart) + restart|force-reload) $0 stop sleep 1 $0 start ;; -*) + *) printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 exit 1 ;; diff --git a/scripts/init-lcdproc.debian.in b/scripts/init-lcdproc.debian.in index c0a3764..53e4551 100644 --- a/scripts/init-lcdproc.debian.in +++ b/scripts/init-lcdproc.debian.in @@ -1,18 +1,15 @@ #!/bin/sh -e -# -# lcdd Startup script for lcdproc -# -# Modified for autoconf -# by Rene Wagner -# Modified for lcd-server -# by Joris Robijn -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# -# Version: $Id$ -DESC="lcdproc @VERSION@" +#### BEGIN INIT INFO +# Provides: lcdproc +# Required-Start: $syslog $local_fs $network $remote_fs +# Required-Stop: $syslog $local_fs $network $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: LCDproc system status information viewer +# Description: Debian init script for lcdproc, the system +# status information viewer in the LCDproc suite +### END INIT INFO prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -20,30 +17,32 @@ bindir=@bindir@ sbindir=@sbindir@ etc=@sysconfdir@ -lcdproc=${bindir}/lcdproc +NAME=lcdproc +DAEMON=${bindir}/${NAME} +DESC="${NAME} @VERSION@" -test -x ${lcdproc} || exit 0 +OPTIONS="" +test -x ${DAEMON} || exit 0 + case "$1" in -start) - printf "Starting $DESC:" - start-stop-daemon --start --quiet --background --exec ${lcdproc} -- $SCREENS - printf " lcdproc" - printf ".\n" + start) + printf "Starting ${DESC}: " + start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS} + printf "${NAME}." ;; -stop) - printf "Stopping $DESC:" - start-stop-daemon --stop --oknodo --quiet --exec ${lcdproc} - printf " lcdproc" - printf ".\n" + stop) + printf "Stopping ${DESC}: " + start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON} + printf "${NAME}." ;; -restart | force-reload) + restart|force-reload) $0 stop sleep 1 $0 start ;; -*) + *) printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 exit 1 ;;