summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2015-08-18 15:33:09 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2015-08-18 15:33:09 -0400
commitadd69c51cf4469ec44db4bae7d21c25da23adbe2 (patch)
tree5b88ea28adb7cd680a63335381f3f07f36ff2188 /debian
parentd57ac4645f0c7d24e00fafee0b5d04dcf6481571 (diff)
downloadmongo-add69c51cf4469ec44db4bae7d21c25da23adbe2.tar.gz
SERVER-18581 Start process with group=mongodb in .deb packages
Diffstat (limited to 'debian')
-rw-r--r--debian/init.d3
-rw-r--r--debian/mongod.upstart3
2 files changed, 4 insertions, 2 deletions
diff --git a/debian/init.d b/debian/init.d
index bc2aacd3caa..8d6b2c26160 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -93,6 +93,7 @@ DIETIME=10 # Time to wait for the server to die, in seconds
# 'restart' will not work
DAEMONUSER=${DAEMONUSER:-mongodb}
+DAEMONGROUP=${DAEMONGROUP:-mongodb}
set -e
@@ -140,7 +141,7 @@ start_server() {
# Start the process using the wrapper
start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
- --make-pidfile --chuid $DAEMONUSER \
+ --make-pidfile --chuid $DAEMONUSER:$DAEMONGROUP \
--exec $NUMACTL $DAEMON $DAEMON_OPTS
errcode=$?
return $errcode
diff --git a/debian/mongod.upstart b/debian/mongod.upstart
index bc3bd2b87a4..84b599e8609 100644
--- a/debian/mongod.upstart
+++ b/debian/mongod.upstart
@@ -32,6 +32,7 @@ script
CONF=/etc/mongod.conf
DAEMON=/usr/bin/mongod
DAEMONUSER=${DAEMONUSER:-mongodb}
+ DAEMONGROUP=${DAEMONGROUP:-mongodb}
if [ -f /etc/default/mongod ]; then . /etc/default/mongod; fi
@@ -50,7 +51,7 @@ script
if [ "x$ENABLE_MONGOD" = "xyes" ]
then
exec start-stop-daemon --start \
- --chuid $DAEMONUSER \
+ --chuid $DAEMONUSER:$DAEMONGROUP \
--pidfile /var/run/mongodb.pid \
--make-pidfile \
--exec $NUMACTL $DAEMON $DAEMON_OPTS