diff options
author | sullrich <sullrich@pfsense.org> | 2009-12-02 23:25:19 -0500 |
---|---|---|
committer | sullrich <sullrich@pfsense.org> | 2009-12-02 23:25:19 -0500 |
commit | 99f98b8009f7a5ce48b17c5295aad11c535610db (patch) | |
tree | 0095b1634a4434adea223a53d8cb313e6f799e0e /etc/inc/vpn.inc | |
parent | cd12593b723b2f4c93d1c8f554a7e99bd66d50fa (diff) | |
download | pfsense-99f98b8009f7a5ce48b17c5295aad11c535610db.zip pfsense-99f98b8009f7a5ce48b17c5295aad11c535610db.tar.gz |
Check to see if processes are running before killing
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 20caf72..9f087a9 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -72,7 +72,8 @@ function vpn_ipsec_failover_configure() { fclose($fd); chmod("{$g['varetc_path']}/sasyncd.conf", 0600); - mwexec("killall sasyncd", true); + if(is_process_running("sasyncd")) + mwexec("killall sasyncd", true); /* launch sasyncd, oh wise one */ mwexec_bg("/usr/local/sbin/sasyncd -d -v -v -v"); @@ -130,7 +131,8 @@ function vpn_ipsec_configure($ipchg = false) mwexec("/sbin/ifconfig enc0 down"); /* kill racoon */ - mwexec("/usr/bin/killall racoon", true); + if(is_process_running("racoon")) + mwexec("/usr/bin/killall racoon", true); killbypid("{$g['varrun_path']}/dnswatch-ipsec.pid"); /* wait for racoon process to die */ @@ -903,7 +905,8 @@ function vpn_ipsec_force_reload() { $ipseccfg = $config['ipsec']; /* kill racoon */ - mwexec("/usr/bin/killall racoon", true); + if(is_process_running("racoon")) + mwexec("/usr/bin/killall racoon", true); /* wait for process to die */ sleep(4); |