File: prelude-lml.init

package info (click to toggle)
prelude-lml 1.0.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,724 kB
  • ctags: 4,520
  • sloc: ansic: 36,137; sh: 11,362; makefile: 253; python: 21
file content (62 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          prelude-lml
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Should-Start:      $local_fs
# Should-Stop:       $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start prelude-lml sensor
### END INIT INFO



test $DEBIAN_SCRIPT_DEBUG && set -v -x

NAME=prelude-lml
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/bin/prelude-lml
PIDFILE=/var/run/$NAME.pid
DAEMONARGS="-d -q -P /var/run/$NAME.pid"

trap "" 1
export LANG=C
export PATH

test -f $DAEMON || exit 0

case "$1" in
  start)
    echo -n "Starting Prelude LML: $NAME"
    start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --oknodo \
    	--quiet -- $DAEMONARGS > /dev/null
	;;

  stop)
    echo -n "Stopping Prelude LML: $NAME"
    start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON --quiet \
    	--oknodo > /dev/null
	;;

  restart|force-restart|reload|force-reload)
    echo -n "Restarting Prelude LML: $NAME"
    start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON --quiet \
    	--oknodo > /dev/null
    start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --oknodo \
    	--quiet -- $DAEMONARGS > /dev/null
        ;;

  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
       	;;
esac

if [ $? -eq 0 ]; then
	echo .
	exit 0
else
	echo failed
	exit 1
fi