From 952e2a787a8601b04c9955eabc20cf25fc0c5c81 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 28 Jun 2016 20:16:00 -0300 Subject: nodm: new package [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 Signed-off-by: Peter Korsgaard --- package/nodm/S90nodm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 package/nodm/S90nodm (limited to 'package/nodm/S90nodm') diff --git a/package/nodm/S90nodm b/package/nodm/S90nodm new file mode 100755 index 000000000..a966e839f --- /dev/null +++ b/package/nodm/S90nodm @@ -0,0 +1,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 $? -- cgit v1.2.3