[Pkg-mongodb-maintainers] [pkg-mongodb] 361/394: systemd: initscript parity

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Wed Sep 21 14:00:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository pkg-mongodb.

commit 2896a38d87ae72daf2e14c66f45f97f55e0b7a94
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Tue Jan 19 09:34:53 2016 +0200

    systemd: initscript parity
    
    Source /etc/default/mongodb and use $CONF and $SOCKETPATH, with the same
    default values as the initscript. Furthermore, use $DAEMON_OPTS if
    available.
    
    Also, specify the group as well for clarity, although strictly not
    needed since systemd uses the User's primary group by default (which
    happens to be mongodb).
---
 debian/mongodb-server.mongodb.service | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/mongodb-server.mongodb.service b/debian/mongodb-server.mongodb.service
index 1b5dbce..6eea70c 100644
--- a/debian/mongodb-server.mongodb.service
+++ b/debian/mongodb-server.mongodb.service
@@ -4,9 +4,13 @@ Documentation=man:mongod(1)
 
 [Service]
 User=mongodb
+Group=mongodb
 RuntimeDirectory=mongodb
 RuntimeDirectoryMode=0755
-ExecStart=/usr/bin/mongod --config /etc/mongodb.conf
+EnvironmentFile=-/etc/default/mongodb
+Environment=CONF=/etc/mongodb.conf
+Environment=SOCKETPATH=/run/mongodb
+ExecStart=/usr/bin/mongod --unixSocketPrefix=${SOCKETPATH} --config ${CONF} $DAEMON_OPTS
 
 [Install]
 WantedBy=multi-user.target

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git



More information about the Pkg-mongodb-maintainers mailing list