Base: LCDproc 0.5.2
[lcdproc-de200c.git] / scripts / init-lcdproc.LSB.in
blob5ac990d85cacc1ba13758945ad0c6ea7a4abb48b
1 #! /bin/sh
3 #### BEGIN INIT INFO
4 # Provides: lcdproc
5 # Required-Start: $syslog $local_fs $network $remote_fs
6 # Required-Stop: $syslog $local_fs $network $remote_fs
7 # Default-Start: 2 3 4 5
8 # Default-Stop: S 0 1 6
9 # Short-Description: LCDproc system status information viewer
10 # Description: LSB init script for lcdproc, the system
11 # status information viewer in the LCDproc suite
12 ### END INIT INFO
15 # local variables
16 prefix=@prefix@
17 exec_prefix=@exec_prefix@
18 bindir=@bindir@
19 sbindir=@sbindir@
20 etc=@sysconfdir@
22 PATH=/sbin:/bin:/usr/sbin:/usr/bin
23 NAME=lcdproc
24 DAEMON=${bindir}/$NAME
25 DESC="LCDproc system status monitor"
26 DEFAULTS=/etc/default/$NAME
27 START=yes
29 # Source defaults file; edit that file to configure this script.
30 if [ -e "${DEFAULTS}" ]; then
31 . "${DEFAULTS}"
34 # If we're not to start the daemon, simply exit
35 if [ "${START}" != "yes" ]; then
36 exit 0
39 # installation check
40 test -x $DAEMON || exit 5
42 # load LSB 3.x init functions
43 . /lib/lsb/init-functions
46 case "$1" in
47 start)
48 log_daemon_msg "Starting $DESC" "$NAME"
49 start_daemon $DAEMON $OPTIONS
50 log_end_msg $?
52 stop)
53 log_daemon_msg "Stopping $DESC" "$NAME"
54 killproc $DAEMON
55 log_end_msg $?
57 restart|reload|force-reload)
58 $0 stop
59 sleep 1
60 $0 start
63 echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
64 exit 2
66 esac
68 exit 0