update existing Debian init scripts; add new Debian & LSB init scripts
This commit is contained in:
+7
-1
@@ -580,8 +580,14 @@ AC_CONFIG_FILES([Makefile
|
|||||||
docs/lcdproc-user/Makefile
|
docs/lcdproc-user/Makefile
|
||||||
docs/lcdproc-user/drivers/Makefile
|
docs/lcdproc-user/drivers/Makefile
|
||||||
scripts/Makefile
|
scripts/Makefile
|
||||||
|
scripts/init-LCDd.LSB
|
||||||
|
scripts/init-lcdproc.LSB
|
||||||
|
scripts/init-lcdexec.LSB
|
||||||
|
scripts/init-lcdvc.LSB
|
||||||
scripts/init-LCDd.debian
|
scripts/init-LCDd.debian
|
||||||
scripts/init-LCDd.rpm
|
|
||||||
scripts/init-lcdproc.debian
|
scripts/init-lcdproc.debian
|
||||||
|
scripts/init-lcdexec.debian
|
||||||
|
scripts/init-lcdvc.debian
|
||||||
|
scripts/init-LCDd.rpm
|
||||||
scripts/init-lcdproc.rpm])
|
scripts/init-lcdproc.rpm])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
+11
-1
@@ -1,6 +1,16 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
EXTRA_DIST = init-LCDd.debian.in init-LCDd.rpm.in init-lcdproc.debian.in init-lcdproc.rpm.in debian
|
EXTRA_DIST = README \
|
||||||
|
init-LCDd.LSB.in \
|
||||||
|
init-lcdproc.LSB.in \
|
||||||
|
init-lcdexec.LSB.in \
|
||||||
|
init-lcdvc.LSB.in \
|
||||||
|
init-LCDd.debian.in \
|
||||||
|
init-lcdproc.debian.in \
|
||||||
|
init-lcdexec.debian.in \
|
||||||
|
init-lcdvc.debian.in \
|
||||||
|
init-LCDd.rpm.in \
|
||||||
|
init-lcdproc.rpm.in debian
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
rm -rf `find $(distdir)/debian -name CVS`
|
rm -rf `find $(distdir)/debian -name CVS`
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
This directory contains
|
||||||
|
* init-script templates for various system types
|
||||||
|
(These templates are adapted to the confugration parameters
|
||||||
|
passed to configure at configure-run-time.)
|
||||||
|
|
||||||
|
- init-*.LSB.in templates for systems conforming to LSB
|
||||||
|
(Linux Standard Base) 3.x. Among others
|
||||||
|
the following distributions support LSB 3.x:
|
||||||
|
- SuSE Linux 10.x
|
||||||
|
- SuSE Linux Enterprise Server 10
|
||||||
|
- SuSE Linux Enterprise Server 9 SP3
|
||||||
|
- Ubuntu 6.06
|
||||||
|
- Debian Etch
|
||||||
|
- RedHat Enterprise Linux4 Update2
|
||||||
|
|
||||||
|
- init-*.debian.in templates for older Debian systems (or modern Debian
|
||||||
|
systems without the lsb-core package installed)
|
||||||
|
|
||||||
|
- init-*.rpm init-scripts for RPM based distributions that are
|
||||||
|
not LSB 3.x conforming.
|
||||||
|
Please try the LSB scripts first.
|
||||||
|
|
||||||
|
- a sub-directory debian/ that contains the infrastructure to create a
|
||||||
|
Debian package for lcdproc.
|
||||||
|
Simply copy the debian/ directory to the top-level source directory,
|
||||||
|
adapt the call in debian/rules to your wishes, call
|
||||||
|
dpkg -rfakeoot -sd
|
||||||
|
and you're done.
|
||||||
@@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
# local variables
|
# local variables
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DAEMON=/usr/sbin/LCDd
|
|
||||||
NAME=LCDd
|
NAME=LCDd
|
||||||
|
DAEMON=/usr/sbin/$NAME
|
||||||
DESC="LCDproc display server daemon"
|
DESC="LCDproc display server daemon"
|
||||||
DEFAULTS=/etc/default/$NAME
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=yes
|
||||||
|
|
||||||
# Source defaults file; edit that file to configure this script.
|
# Source defaults file; edit that file to configure this script.
|
||||||
if [ -e "${DEFAULTS}" ]; then
|
if [ -e "${DEFAULTS}" ]; then
|
||||||
@@ -53,7 +54,7 @@ case "$1" in
|
|||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
# local variables
|
# local variables
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DAEMON=/usr/bin/lcdproc
|
|
||||||
NAME=lcdproc
|
NAME=lcdproc
|
||||||
|
DAEMON=/usr/bin/$NAME
|
||||||
DESC="LCDproc system status monitor"
|
DESC="LCDproc system status monitor"
|
||||||
DEFAULTS=/etc/default/$NAME
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=yes
|
||||||
|
|
||||||
# Source defaults file; edit that file to configure this script.
|
# Source defaults file; edit that file to configure this script.
|
||||||
if [ -e "${DEFAULTS}" ]; then
|
if [ -e "${DEFAULTS}" ]; then
|
||||||
@@ -53,7 +54,7 @@ case "$1" in
|
|||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
# local variables
|
# local variables
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DAEMON=/usr/bin/lcdexec
|
|
||||||
NAME=lcdexec
|
NAME=lcdexec
|
||||||
|
DAEMON=/usr/bin/$NAME
|
||||||
DESC="LCDproc program starter"
|
DESC="LCDproc program starter"
|
||||||
DEFAULTS=/etc/default/$NAME
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=no
|
||||||
|
|
||||||
# Source defaults file; edit that file to configure this script.
|
# Source defaults file; edit that file to configure this script.
|
||||||
if [ -e "${DEFAULTS}" ]; then
|
if [ -e "${DEFAULTS}" ]; then
|
||||||
@@ -53,7 +54,7 @@ case "$1" in
|
|||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
# local variables
|
# local variables
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
DAEMON=/usr/bin/lcdvc
|
|
||||||
NAME=lcdvc
|
NAME=lcdvc
|
||||||
|
DAEMON=/usr/bin/$NAME
|
||||||
DESC="LCDproc virtual console"
|
DESC="LCDproc virtual console"
|
||||||
DEFAULTS=/etc/default/$NAME
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=no
|
||||||
|
|
||||||
# Source defaults file; edit that file to configure this script.
|
# Source defaults file; edit that file to configure this script.
|
||||||
if [ -e "${DEFAULTS}" ]; then
|
if [ -e "${DEFAULTS}" ]; then
|
||||||
@@ -53,7 +54,7 @@ case "$1" in
|
|||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
#### 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: LSB init script for LCDd, the display
|
||||||
|
# server daemon in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
NAME=LCDd
|
||||||
|
DAEMON=${sbindir}/$NAME
|
||||||
|
DESC="LCDproc display server daemon"
|
||||||
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=yes
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x $DAEMON || exit 5
|
||||||
|
|
||||||
|
# load LSB 3.x init functions
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
|
start_daemon $DAEMON $OPTIONS
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
killproc $DAEMON
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
restart|reload|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
+18
-18
@@ -11,6 +11,7 @@
|
|||||||
# server daemon in the LCDproc suite
|
# server daemon in the LCDproc suite
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
# local variables
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
@@ -19,33 +20,32 @@ etc=@sysconfdir@
|
|||||||
|
|
||||||
NAME=LCDd
|
NAME=LCDd
|
||||||
DAEMON=${sbindir}/${NAME}
|
DAEMON=${sbindir}/${NAME}
|
||||||
DESC="${NAME} @VERSION@"
|
DESC="LCDproc display server daemon"
|
||||||
|
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
|
|
||||||
|
# installation check
|
||||||
test -x ${DAEMON} || exit 0
|
test -x ${DAEMON} || exit 0
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
printf "Starting ${DESC}: "
|
printf "Starting ${DESC}: "
|
||||||
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
|
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
|
||||||
printf "${NAME}."
|
printf "${NAME}."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
printf "Stopping ${DESC}: "
|
printf "Stopping ${DESC}: "
|
||||||
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
|
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
|
||||||
printf "${NAME}."
|
printf "${NAME}."
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
$0 stop
|
$0 stop
|
||||||
sleep 1
|
sleep 1
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
#### BEGIN INIT INFO
|
||||||
|
# Provides: lcdexec
|
||||||
|
# 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 program starter from the LCDd menu
|
||||||
|
# Description: LSB init script for lcdexec, the client to
|
||||||
|
# start programs from the LCDd menu in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
NAME=lcdexec
|
||||||
|
DAEMON=${bindir}/$NAME
|
||||||
|
DESC="LCDproc program starter"
|
||||||
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=no
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x $DAEMON || exit 5
|
||||||
|
|
||||||
|
# load LSB 3.x init functions
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
|
start_daemon $DAEMON $OPTIONS
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
killproc $DAEMON
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
restart|reload|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
#### BEGIN INIT INFO
|
||||||
|
# Provides: lcdexec
|
||||||
|
# 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 program starter from the LCDd menu
|
||||||
|
# Description: Debian init script for lcdexec, the client to
|
||||||
|
# start programs from the LCDd menu in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
NAME=lcdexec
|
||||||
|
DAEMON=${bindir}/${NAME}
|
||||||
|
DESC="LCDproc program starter"
|
||||||
|
OPTIONS=""
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x ${DAEMON} || exit 0
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
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 ${DAEMON}
|
||||||
|
printf "${NAME}."
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
#### 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: LSB init script for lcdproc, the system
|
||||||
|
# status information viewer in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
NAME=lcdproc
|
||||||
|
DAEMON=${bindir}/$NAME
|
||||||
|
DESC="LCDproc system status monitor"
|
||||||
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=yes
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x $DAEMON || exit 5
|
||||||
|
|
||||||
|
# load LSB 3.x init functions
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
|
start_daemon $DAEMON $OPTIONS
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
killproc $DAEMON
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
restart|reload|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
# status information viewer in the LCDproc suite
|
# status information viewer in the LCDproc suite
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
# local variables
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
@@ -19,33 +20,32 @@ etc=@sysconfdir@
|
|||||||
|
|
||||||
NAME=lcdproc
|
NAME=lcdproc
|
||||||
DAEMON=${bindir}/${NAME}
|
DAEMON=${bindir}/${NAME}
|
||||||
DESC="${NAME} @VERSION@"
|
DESC="LCDproc system status monitor"
|
||||||
|
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
|
|
||||||
|
# installation check
|
||||||
test -x ${DAEMON} || exit 0
|
test -x ${DAEMON} || exit 0
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
printf "Starting ${DESC}: "
|
printf "Starting ${DESC}: "
|
||||||
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
|
start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
|
||||||
printf "${NAME}."
|
printf "${NAME}."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
printf "Stopping ${DESC}: "
|
printf "Stopping ${DESC}: "
|
||||||
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
|
start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
|
||||||
printf "${NAME}."
|
printf "${NAME}."
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
$0 stop
|
$0 stop
|
||||||
sleep 1
|
sleep 1
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
#### BEGIN INIT INFO
|
||||||
|
# Provides: lcdvc
|
||||||
|
# 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 virtual console
|
||||||
|
# Description: LSB init script for lcdvc, the virtual
|
||||||
|
# console client in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
NAME=lcdvc
|
||||||
|
DAEMON=${bindir}/$NAME
|
||||||
|
DESC="LCDproc virtual console"
|
||||||
|
DEFAULTS=/etc/default/$NAME
|
||||||
|
START=no
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x $DAEMON || exit 5
|
||||||
|
|
||||||
|
# load LSB 3.x init functions
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting $DESC" "$NAME"
|
||||||
|
start_daemon $DAEMON $OPTIONS
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||||
|
killproc $DAEMON
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
restart|reload|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
#### BEGIN INIT INFO
|
||||||
|
# Provides: lcdvc
|
||||||
|
# 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 virtual console
|
||||||
|
# Description: Debian init script for lcdvc, the virtual
|
||||||
|
# console client in the LCDproc suite
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# local variables
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
etc=@sysconfdir@
|
||||||
|
|
||||||
|
NAME=lcdvc
|
||||||
|
DAEMON=${bindir}/${NAME}
|
||||||
|
DESC="LCDproc virtual console"
|
||||||
|
OPTIONS=""
|
||||||
|
|
||||||
|
# installation check
|
||||||
|
test -x ${DAEMON} || exit 0
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
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 ${DAEMON}
|
||||||
|
printf "${NAME}."
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user