summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-02 23:25:19 -0500
committersullrich <sullrich@pfsense.org>2009-12-02 23:25:19 -0500
commit99f98b8009f7a5ce48b17c5295aad11c535610db (patch)
tree0095b1634a4434adea223a53d8cb313e6f799e0e /etc/inc/service-utils.inc
parentcd12593b723b2f4c93d1c8f554a7e99bd66d50fa (diff)
downloadpfsense-99f98b8009f7a5ce48b17c5295aad11c535610db.zip
pfsense-99f98b8009f7a5ce48b17c5295aad11c535610db.tar.gz
Check to see if processes are running before killing
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index e4e1755..0d4c1e1 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -115,7 +115,8 @@ function stop_service($name) {
eval($service['stopcmd']);
}
if(!($service['rcfile'] or $service['stopcmd'])) {
- mwexec_bg("/usr/bin/killall {$service['executable']}");
+ if(is_process_running("{$service['executable']}"))
+ mwexec_bg("/usr/bin/killall {$service['executable']}");
return;
}
break;
@@ -123,6 +124,7 @@ function stop_service($name) {
}
}
/* finally if we get here lets simply kill the service name */
+if(is_process_running("{$name}"))
mwexec_bg("/usr/bin/killall {$name}");
}
OpenPOWER on IntegriCloud