~ubuntu-branches/ubuntu/raring/epoptes/raring

« back to all changes in this revision

Viewing changes to debian/epoptes.init

  • Committer: Package Import Robot
  • Author(s): Alkis Georgopoulos
  • Date: 2012-04-09 18:58:03 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120409185803-7yq74fpolwjdy6o4
Tags: 0.5.3-1
* Use better checks to detect LTSP clients (LP: #975784).
* Correct start-stop-daemon parameters (LP: #975433).
* Add Afrikaans, English (Australia), Malay and Portuguese translations.
  Many thanks to the translators!

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
### END INIT INFO
12
12
 
13
13
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14
 
DAEMON=/usr/bin/twistd
 
14
DAEMON=/usr/bin/python
15
15
PIDFILE=/var/run/epoptes.pid
16
16
LOGFILE=/var/log/epoptes.log
17
17
DESC="Epoptes service"
18
18
 
19
 
# If this is an LTSP chroot, then only run the service if EPOPTES=True
20
 
if [ -f /etc/ltsp_chroot ] && [ -f /usr/share/ltsp/ltsp-common-functions ]; then
21
 
    . /usr/share/ltsp/ltsp-common-functions
22
 
    eval $(getltscfg -a) || true
23
 
    boolean_is_true "$EPOPTES" || exit 0
 
19
# If this is an LTSP client, then only run the service if EPOPTES=True
 
20
if egrep -qs 'ltsp|nfs|nbd' /proc/cmdline && [ -x /usr/bin/getltscfg ]; then
 
21
    case "$(getltscfg EPOPTES || true)" in
 
22
       [Tt][Rr][Uu][Ee]|[Yy]|[Yy][Ee][Ss])
 
23
            ;;
 
24
       *)
 
25
            exit 0
 
26
            ;;
 
27
    esac
24
28
fi
25
29
 
26
30
. /lib/lsb/init-functions
28
32
case "$1" in
29
33
    start)
30
34
        log_daemon_msg "Starting the epoptes daemon"
31
 
        start-stop-daemon --start --quiet --oknodo --exec "$DAEMON" -- --pidfile "$PIDFILE" --logfile "$LOGFILE" epoptes
 
35
        start-stop-daemon --start --startas /usr/bin/twistd --quiet --oknodo --pidfile "$PIDFILE" --exec "$DAEMON" -- \
 
36
            --pidfile "$PIDFILE" --logfile "$LOGFILE" epoptes
32
37
        log_end_msg $?
33
38
        ;;
34
39
    stop)