~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init.d/LCDd

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
#
3
 
# LCDd  initscript for LCDd
4
 
# by Jose Luis Tallon <jltallon@adv-solutions.net>
5
 
#
6
 
### BEGIN INIT INFO
7
 
# Provides:          lcdd LCDd
8
 
# Required-Start:    $remote_fs $syslog
9
 
# Required-Stop:     $remote_fs $syslog
10
 
# Default-Start:     2 3 4 5
11
 
# Default-Stop:      0 1 6
12
 
# Short-Description: LCD daemon
13
 
# Description:       Control LCD displays connected to the computer
14
 
### END INIT INFO
15
 
#
16
 
#       Written by Miquel van Smoorenburg <miquels@cistron.nl>.
17
 
#       Modified for Debian 
18
 
#       by Ian Murdock <imurdock@gnu.ai.mit.edu>.
19
 
#       Modified for lcdproc by Jonathan Oxer <jon@debian.org>
20
 
#
21
 
#
22
 
 
23
 
 
24
 
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
25
 
DAEMON=/usr/sbin/LCDd
26
 
NAME="LCDd"
27
 
DESC="LCDd"
28
 
 
29
 
# by default, LCDd runs with curses driver. This driver will display stuff
30
 
# on terminal even if run in background. This spoils the installation fun.
31
 
# So LCDd is configured to run in foreground and will be pushed
32
 
# in background by stop-start-daemon
33
 
DAEMON_OPTS="-s 1 -f -c /etc/LCDd.conf"
34
 
 
35
 
. /lib/lsb/init-functions
36
 
 
37
 
test -x $DAEMON || exit 0
38
 
 
39
 
start_lcdd () {
40
 
        start-stop-daemon --start --quiet --background \
41
 
                --exec $DAEMON -- $DAEMON_OPTS
42
 
}
43
 
 
44
 
stop_lcdd () {
45
 
        start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
46
 
}
47
 
 
48
 
set -e
49
 
 
50
 
case "$1" in
51
 
  start)
52
 
        echo -n "Starting $DESC: "
53
 
        start_lcdd;
54
 
        echo "$NAME."
55
 
        ;;
56
 
  stop)
57
 
        echo -n "Stopping $DESC: "
58
 
        stop_lcdd;
59
 
        echo "$NAME."
60
 
        ;;
61
 
  restart|force-reload)
62
 
        echo -n "Restarting $DESC: "
63
 
        stop_lcdd
64
 
        sleep 2
65
 
        start_lcdd
66
 
        echo "$NAME."
67
 
        ;;
68
 
  status)
69
 
        start-stop-daemon --status --exec $DAEMON
70
 
        echo "$NAME."
71
 
        ;;
72
 
  *)
73
 
        N=/etc/init.d/$NAME
74
 
        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
75
 
        echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
76
 
        exit 1
77
 
        ;;
78
 
esac
79
 
 
80
 
exit 0