diff options
author | Sam Kleinman <samk@10gen.com> | 2016-01-19 11:51:36 -0500 |
---|---|---|
committer | Sam Kleinman <samk@10gen.com> | 2016-02-09 13:17:41 -0500 |
commit | 985e2a0be95709ac064c57f0a9bb385a55937285 (patch) | |
tree | 640cabbfa77d72dbf7b8d068403009b347253070 /rpm/init.d-mongod | |
parent | 8a58e2fb57806c0ccd415773d490167e783941bf (diff) | |
download | mongo-985e2a0be95709ac064c57f0a9bb385a55937285.tar.gz |
SERVER-20930 SERVER-20404: clarify sysconfig and default config override
Diffstat (limited to 'rpm/init.d-mongod')
-rwxr-xr-x | rpm/init.d-mongod | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod index 7ddff0be2eb..cd135c51af6 100755 --- a/rpm/init.d-mongod +++ b/rpm/init.d-mongod @@ -10,28 +10,24 @@ . /etc/rc.d/init.d/functions -# things from mongod.conf get there by mongod reading it - - # 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" -SYSCONFIG="/etc/sysconfig/mongod" - -PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'" | awk -F'#' '{print $1}'` mongod=${MONGOD-/usr/bin/mongod} MONGO_USER=mongod MONGO_GROUP=mongod +# All variables set before this point can be overridden by users, by +# setting them directly in the SYSCONFIG file. Use this to explicitly +# override these values, at your own risk. +SYSCONFIG="/etc/sysconfig/mongod" if [ -f "$SYSCONFIG" ]; then . "$SYSCONFIG" fi -PIDDIR=`dirname $PIDFILEPATH` - # Handle NUMA access to CPUs (SERVER-3574) # This verifies the existence of numactl as well as testing that the command works NUMACTL_ARGS="--interleave=all" @@ -42,6 +38,10 @@ 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 |