File: digitools.init

package info (click to toggle)
digitools 1.03-1.2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 232 kB
  • ctags: 356
  • sloc: ansic: 2,143; makefile: 260; sh: 36
file content (56 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
### BEGIN INIT INFO
# Provides:          digitools
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Wake-On-CIR for ASUS Digimatrix script
### END INIT INFO
#
#     Cyril Lacoux <clacoux@easter-eggs.com>
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DIGIWAKE=/usr/sbin/digiwake
NAME=digiwake
DESC=digiwake
WAKE_ON_CIR="no"

test -x $DIGIWAKE || exit 0

# Include digitools defaults if available
if [ -f /etc/default/digitools ] ; then
    . /etc/default/digitools
fi

if [ "${WAKE_ON_CIR}" != "yes" ] ; then
    exit 0
fi

set -e

case "$1" in
    start)
        echo -n "Enabling Wake-On-CIR: "
        ${DIGIWAKE} -w >/dev/null 2>&1
        echo "$NAME."
    ;;
    stop)
        echo -n "Enabling Wake-On-CIR: "
        ${DIGIWAKE} -w >/dev/null 2>&1
        echo "$NAME."
    ;;
    restart|reload|force-reload)
        echo -n "Enabling Wake-On-CIR: "
        ${DIGIWAKE} -w >/dev/null 2>&1
        echo "$NAME."
    ;;
    *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start}" >&2
        exit 1
    ;;
esac

exit 0