mirror of https://github.com/mongodb/mongo
Support an ENABLE_MONGODB knob in /etc/default on Debianoids. SERVER-709
This commit is contained in:
parent
d22498af7a
commit
09f3ed3808
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue