summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'rpm')
-rwxr-xr-xrpm/init.d-mongod5
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.