blob: a966e839f5099245805d01e75ba509f416361332 (
plain)
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
|
#!/bin/sh
#
# Starts nodm
#
NODM_FIRST_VT=7
NODM_XSESSION=/etc/X11/Xsession
NODM_OPTIONS=
NODM_X_OPTIONS="-nolisten tcp"
NODM_USER=root
NODM_MIN_SESSION_TIME=60
NODM_X_TIMEOUT=300
[ -r /etc/default/nodm ] && . /etc/default/nodm
export NODM_XSESSION NODM_X_OPTIONS NODM_USER NODM_MIN_SESSION_TIME NODM_FIRST_VT NODM_X_TIMEOUT
start() {
printf "Starting nodm: "
start-stop-daemon -S -q -p /var/run/nodm.pid --exec /usr/sbin/nodm -b -m -S -- ${NODM_OPTIONS}
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping nodm: "
start-stop-daemon -K -q -p /var/run/nodm.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
|