0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-26575 Quote PIDFILEPATH

This commit is contained in:
Brian Samek 2016-10-12 16:58:33 -04:00
parent 0344a7542f
commit 1fcd8435b8

View File

@ -38,7 +38,7 @@ else
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}'`
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()
@ -49,7 +49,7 @@ start()
fi
# Make sure the pidfile does not exist
if [ -f $PIDFILEPATH ]; then
if [ -f "$PIDFILEPATH" ]; then
echo "Error starting mongod. $PIDFILEPATH exists."
RETVAL=1
return