summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2014-11-26 20:23:33 -0200
committerdrebs <drebs@leap.se>2014-12-05 14:40:11 -0200
commit6b6b4af8edc807726341b848165c91ff02e9148b (patch)
treebd6f05a39a65aba56009539dce675190a6fa5d8c
parentc88472a94c15adef4275242934f2a3eec9778dd4 (diff)
Run daemon as user soledad (#6436).
-rw-r--r--server/changes/bug_6436_run-daemon-as-user-soledad1
-rw-r--r--server/pkg/soledad6
2 files changed, 6 insertions, 1 deletions
diff --git a/server/changes/bug_6436_run-daemon-as-user-soledad b/server/changes/bug_6436_run-daemon-as-user-soledad
new file mode 100644
index 00000000..886964f1
--- /dev/null
+++ b/server/changes/bug_6436_run-daemon-as-user-soledad
@@ -0,0 +1 @@
+ o Run daemon as user soledad (#6436).
diff --git a/server/pkg/soledad b/server/pkg/soledad
index 62b7c5f8..7f48e2c8 100644
--- a/server/pkg/soledad
+++ b/server/pkg/soledad
@@ -20,6 +20,8 @@ PRIVKEY_PATH=/etc/leap/soledad-server.key
TWISTD_PATH=/usr/bin/twistd
HOME=/var/lib/soledad/
SSL_METHOD=TLSv1_METHOD
+USER=soledad
+GROUP=soledad
[ -r /etc/default/soledad ] && . /etc/default/soledad
@@ -31,7 +33,9 @@ test -r /etc/leap/ || exit 0
case "$1" in
start)
echo -n "Starting soledad: twistd"
- start-stop-daemon --start --quiet --exec $TWISTD_PATH -- \
+ start-stop-daemon --start --quiet \
+ --user=$USER --group=$GROUP \
+ --exec $TWISTD_PATH -- \
--pidfile=$PIDFILE \
--logfile=$LOGFILE \
web \