summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2018-03-28 16:10:16 +0200
committerJan Dittberner <jandd@cacert.org>2018-03-28 16:10:16 +0200
commit1a0e08ae287cabcb40ff64c0f7d58c6f11ca1a87 (patch)
tree6e1169d88d96e62409c1d2e49377f10eb4d9995e
parent8afe6775bca33110b89c4c88f260208765957dce (diff)
downloadcacert-puppet-1a0e08ae287cabcb40ff64c0f7d58c6f11ca1a87.tar.gz
cacert-puppet-1a0e08ae287cabcb40ff64c0f7d58c6f11ca1a87.tar.xz
cacert-puppet-1a0e08ae287cabcb40ff64c0f7d58c6f11ca1a87.zip
Define user and workdir for boardvoting service
-rw-r--r--sitemodules/profiles/files/cacert_boardvoting/init.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/sitemodules/profiles/files/cacert_boardvoting/init.sh b/sitemodules/profiles/files/cacert_boardvoting/init.sh
index dc815c6..763dec4 100644
--- a/sitemodules/profiles/files/cacert_boardvoting/init.sh
+++ b/sitemodules/profiles/files/cacert_boardvoting/init.sh
@@ -16,6 +16,8 @@ BASE=boardvoting
BOARDVOTING=/usr/local/bin/cacert-boardvoting
BOARDVOTING_PIDFILE=/var/run/$BASE.pid
BOARDVOTING_LOGFILE=/var/log/$BASE.log
+BOARDVOTING_WORKDIR=/var/lib/$BASE
+BOARDVOTING_USER=$BASE
BOARDVOTING_OPTS=
BOARDVOTING_DESC="Boardvoting"
@@ -49,7 +51,9 @@ case "$1" in
log_begin_msg "Starting $BOARDVOTING_DESC: $BOARDVOTING"
start-stop-daemon --start --background --no-close \
--exec "$BOARDVOTING" \
+ --user "$BOARDVOTING_USER" \
--pidfile "$BOARDVOTING_PIDFILE" \
+ --chdir "$BOARDVOTING_WORKDIR" \
--make-pidfile \
-- \
$BOARDVOTING_OPTS >> "$BOARDVOTING_LOGFILE" 2>&1