Support an ENABLE_MONGODB knob in /etc/default on Debianoids. SERVER-709

This commit is contained in:
Richard Kreuter 2010-03-08 14:32:44 -05:00
parent d22498af7a
commit 09f3ed3808
2 changed files with 9 additions and 2 deletions

4
debian/init.d vendored
View File

@ -68,6 +68,10 @@ if test ! -x $DAEMON; then
exit 0 exit 0
fi fi
if test "x$ENABLE_MONGODB" != "xyes"; then
exit 0
fi
if test ! -x $DATA; then if test ! -x $DATA; then
mkdir $DATA || exit 0 mkdir $DATA || exit 0
fi fi

View File

@ -8,5 +8,8 @@ end script
start on runlevel [2345] start on runlevel [2345]
stop on runlevel [06] stop on runlevel [06]
exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongodb.conf script
ENABLE_MONGODB="yes"
if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi
if [ "x$ENABLE_MONGODB" = "xyes" ]; then start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongodb.conf; fi
end script