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:
parent
0344a7542f
commit
1fcd8435b8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user