summaryrefslogtreecommitdiffstats
path: root/system/triggerhappy/rc.triggerhappy
diff options
context:
space:
mode:
Diffstat (limited to 'system/triggerhappy/rc.triggerhappy')
-rw-r--r--system/triggerhappy/rc.triggerhappy6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/triggerhappy/rc.triggerhappy b/system/triggerhappy/rc.triggerhappy
index d8f3266484..5dd6f3ed50 100644
--- a/system/triggerhappy/rc.triggerhappy
+++ b/system/triggerhappy/rc.triggerhappy
@@ -3,8 +3,12 @@
# rc.triggerhappy, sysv-style init script for triggerhappy.
# part of the slackbuilds.org triggerhappy build.
+# The daemon has to be started as root, but will drop privileges
+# and run as this user after initialization:
+THD_USER=nobody
+
THD_SOCKET=/var/run/thd.socket
-THD_ARGS="--daemon --user nobody --socket $THD_SOCKET --triggers /etc/triggerhappy/triggers.d/ /dev/input/event*"
+THD_ARGS="--daemon --user $THD_USER --socket $THD_SOCKET --triggers /etc/triggerhappy/triggers.d/ /dev/input/event*"
case "$1" in
""|"start") if [ -e $THD_SOCKET ]; then