From 09f3ed3808adf50dde49338317d715b5a503830d Mon Sep 17 00:00:00 2001 From: Richard Kreuter Date: Mon, 8 Mar 2010 14:32:44 -0500 Subject: Support an ENABLE_MONGODB knob in /etc/default on Debianoids. SERVER-709 --- debian/init.d | 4 ++++ debian/mongodb.upstart | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/init.d b/debian/init.d index bfa9c39609e..d735ee39b66 100644 --- a/debian/init.d +++ b/debian/init.d @@ -68,6 +68,10 @@ if test ! -x $DAEMON; then exit 0 fi +if test "x$ENABLE_MONGODB" != "xyes"; then + exit 0 +fi + if test ! -x $DATA; then mkdir $DATA || exit 0 fi diff --git a/debian/mongodb.upstart b/debian/mongodb.upstart index 56478966238..db061d57e64 100644 --- a/debian/mongodb.upstart +++ b/debian/mongodb.upstart @@ -8,5 +8,8 @@ end script start on runlevel [2345] 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 -- cgit v1.2.1