diff options
Diffstat (limited to 'rpm/init.d-mongod')
-rwxr-xr-x | rpm/init.d-mongod | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod index 6368964dd99..ffbd3005b86 100755 --- a/rpm/init.d-mongod +++ b/rpm/init.d-mongod @@ -9,10 +9,13 @@ . /etc/rc.d/init.d/functions +PIDFILEPATH="/var/run/mongodb/mongod.pid" +PIDDIR=`dirname $PIDFILEPATH` + # NOTE: if you change any OPTIONS here, you get what you pay for: # this script assumes all options are in the config file. CONFIGFILE="/etc/mongod.conf" -OPTIONS=" -f $CONFIGFILE" +OPTIONS=" -f $CONFIGFILE --fork --pidfilepath $PIDFILEPATH" mongod=${MONGOD-/usr/bin/mongod} @@ -37,10 +40,6 @@ else NUMACTL="" fi -# things from mongod.conf get there by mongod reading it -PIDFILEPATH="`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' \"$CONFIGFILE\" | tr -d \"[:blank:]\\"'\" | awk -F'#' '{print $1}'`" -PIDDIR=`dirname $PIDFILEPATH` - start() { # Make sure the default pidfile directory exists |