source: epoptes/trunk/fuentes/debian/epoptes-client.init @ 295

Last change on this file since 295 was 295, checked in by mabarracus, 3 years ago

copy trusty epoptes code

File size: 1.1 KB
Line 
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides:          epoptes-client
4# Required-Start:    $network $remote_fs $syslog
5# Required-Stop:     $network $remote_fs $syslog
6# Default-Start:     2 3 4 5
7# Default-Stop:
8# Short-Description: Epoptes client LTSP helper
9# Description:       Helper sysvinit script that launches epoptes-client on
10#                    LTSP clients, as they don't receive an if-up event.
11### END INIT INFO
12
13PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14DAEMON=/usr/sbin/epoptes-client
15NAME=epoptes-client
16DESC="Epoptes client LTSP helper"
17
18test -x "$DAEMON" || exit 0
19
20# ltsp-build-client in LTSP versions prior to 5.3 used an RC_WHITELIST which
21# resulted in the network service being deleted, and the clients not getting
22# an if-up event.
23# So we only need to run on LTSP chroots earlier than 5.3.
24test -f /etc/ltsp_chroot || exit 0
25grep -qs "init=/sbin/init-ltsp" /proc/cmdline && exit 0
26
27case "$1" in
28    start|restart|force-reload)
29        "$DAEMON" &
30        ;;
31    stop)
32        ;;
33    *)
34        echo "Usage: $0 {start|stop|restart|force-reload}" >&2
35        exit 1
36    ;;
37esac
Note: See TracBrowser for help on using the repository browser.