~ubuntu-branches/ubuntu/trusty/lcd4linux/trusty

« back to all changes in this revision

Viewing changes to debian/init.d

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2005-10-24 21:09:48 UTC
  • Revision ID: james.westby@ubuntu.com-20051024210948-i54urcvvlooc7ose
Tags: 0.10.0+cvs20051015-2
Added libmysqlclient-dev, python-dev, libx11-dev, libncurses5-dev, libusb-dev
and libgd2-xpm-dev to build-dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# skeleton      example file to build /etc/init.d/ scripts.
 
4
#               This file should be used to construct scripts for /etc/init.d.
 
5
#
 
6
#               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
 
7
#               Modified for Debian 
 
8
#               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
 
9
#
 
10
# Version:      @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
 
11
#
 
12
 
 
13
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
14
DAEMON=/usr/sbin/lcd4linux
 
15
NAME=lcd4linux
 
16
DESC=lcd4linux
 
17
 
 
18
test -x $DAEMON || exit 0
 
19
 
 
20
# Include lcd4linux defaults if available
 
21
if [ -f /etc/default/lcd4linux ] ; then
 
22
        . /etc/default/lcd4linux
 
23
fi
 
24
 
 
25
set -e
 
26
 
 
27
case "$1" in
 
28
  start)
 
29
        echo -n "Starting $DESC: "
 
30
        chmod 600 /etc/lcd4linux.conf
 
31
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 
32
                --exec $DAEMON -- $DAEMON_OPTS
 
33
        echo "$NAME."
 
34
        ;;
 
35
  stop)
 
36
        echo -n "Stopping $DESC: "
 
37
        start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 
38
                --exec $DAEMON
 
39
        echo "$NAME."
 
40
        ;;
 
41
  #reload)
 
42
        #
 
43
        #       If the daemon can reload its config files on the fly
 
44
        #       for example by sending it SIGHUP, do it here.
 
45
        #
 
46
        #       If the daemon responds to changes in its config file
 
47
        #       directly anyway, make this a do-nothing entry.
 
48
        #
 
49
        # echo "Reloading $DESC configuration files."
 
50
        # start-stop-daemon --stop --signal 1 --quiet --pidfile \
 
51
        #       /var/run/$NAME.pid --exec $DAEMON
 
52
  #;;
 
53
  restart|force-reload)
 
54
        #
 
55
        #       If the "reload" option is implemented, move the "force-reload"
 
56
        #       option to the "reload" entry above. If not, "force-reload" is
 
57
        #       just the same as "restart".
 
58
        #
 
59
        echo -n "Restarting $DESC: "
 
60
        start-stop-daemon --stop --quiet --pidfile \
 
61
                /var/run/$NAME.pid --exec $DAEMON
 
62
        sleep 1
 
63
        start-stop-daemon --start --quiet --pidfile \
 
64
                /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
 
65
        echo "$NAME."
 
66
        ;;
 
67
  *)
 
68
        N=/etc/init.d/$NAME
 
69
        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
 
70
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
 
71
        exit 1
 
72
        ;;
 
73
esac
 
74
 
 
75
exit 0