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
|
From: Simon McVittie <smcv@debian.org>
Date: Mon, 8 May 2017 17:01:40 +0100
Subject: nodm.service: Don't respawn or fail if disabled in
/etc/default
Bug-Debian: https://bugs.debian.org/861771
---
nodm.service.in | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/nodm.service.in b/nodm.service.in
index 0b7e95b..b53fef8 100644
--- a/nodm.service.in
+++ b/nodm.service.in
@@ -5,8 +5,11 @@ After=plymouth-quit.service systemd-user-sessions.service
[Service]
EnvironmentFile=-/etc/default/nodm
-ExecStartPre=/usr/bin/test ${NODM_ENABLED} != no -a ${NODM_ENABLED} != false
-ExecStart=@sbindir@/nodm $NODM_OPTIONS
+# 77 is EX_NOPERM, and doesn't seem to be used by nodm itself
+# Don't respawn or mark as failed if disabled via /etc/default/nodm
+RestartPreventExitStatus=77
+SuccessExitStatus=77
+ExecStart=/bin/sh -c 'if test ${NODM_ENABLED} = no || test ${NODM_ENABLED} = false; then exit 77; else exec @sbindir@/nodm $NODM_OPTIONS; fi'
Restart=always
KillMode=mixed
TimeoutStopSec=10
|