diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2019-06-04 15:44:33 -0400 |
---|---|---|
committer | Mathew Robinson <chasinglogic@gmail.com> | 2019-06-07 13:59:26 -0400 |
commit | 63d6c6a1bc51c2a8977e515578555c7c259d5493 (patch) | |
tree | b932376d2272ac441474e400d86faadedd3c3cf7 /rpm | |
parent | c1d1565780fa3c7fc18b591b3f1e8e0e52f3519f (diff) | |
download | mongo-63d6c6a1bc51c2a8977e515578555c7c259d5493.tar.gz |
SERVER-41546 SysV init scripts should verify PIDfile exists instead of failing
(cherry picked from commit 65daaae2ffa01cbb741db69922b5f7cd4ed7836b)
Diffstat (limited to 'rpm')
-rwxr-xr-x | rpm/init.d-mongod | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod index b4f5a662a9e..9b228203163 100755 --- a/rpm/init.d-mongod +++ b/rpm/init.d-mongod @@ -100,6 +100,11 @@ mongo_killproc() local -i duration=10 local pid=`pidofproc -p "${pid_file}" ${procname}` + if [ ! -f "${pid_file}" ]; then + echo "No PID file detected, nothing to stop" + exit 0 + fi + # Per the man page the process name should always be the second # field. In our case mongod is wrapped in parens hence the parens in # the if condition below. |