summaryrefslogtreecommitdiffstats
path: root/etc/inc/vslb.inc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-02 23:51:33 -0500
committersullrich <sullrich@pfsense.org>2009-12-02 23:51:33 -0500
commit97733a2763a039359044b085d37e561d1c84d9f6 (patch)
treed0459140f0a57c481a5b89faa501c12058f72551 /etc/inc/vslb.inc
parent375f7bbef4ec19c191f3181f2340a3ff67ed4cc7 (diff)
downloadpfsense-97733a2763a039359044b085d37e561d1c84d9f6.zip
pfsense-97733a2763a039359044b085d37e561d1c84d9f6.tar.gz
Ensure process is running before killing
Diffstat (limited to 'etc/inc/vslb.inc')
-rw-r--r--etc/inc/vslb.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index 8792386..ac1bd4d 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -199,12 +199,14 @@ EOD;
if($should_start == 1) {
fwrite($fd, $slbdconf);
fclose($fd);
- mwexec("/usr/bin/killall -9 slbd", true);
+ if(is_process_running("slbd"))
+ mwexec("/usr/bin/killall -9 slbd", true);
sleep(2);
/* startup slbd pointing it's config at /var/etc/slbd.conf with a polling interval of 5 seconds */
mwexec("/usr/local/sbin/slbd -c{$g['varetc_path']}/slbd.conf -r5000");
} else {
- mwexec("/usr/bin/killall -9 slbd", true);
+ if(is_process_running("slbd"))
+ mwexec("/usr/bin/killall -9 slbd", true);
fclose($fd);
}
OpenPOWER on IntegriCloud