952e2a787a
[Peter: propagate linux-pam dependencies/comment, needs wordexp.h, not available on uClibc, use /etc/default/nodm for config override, correct github/site/source handling, disable help2man] Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
50 lines
811 B
Bash
Executable File
50 lines
811 B
Bash
Executable File
#!/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 $?
|