diff options
author | Chris Buechler <cmb@pfsense.org> | 2010-07-11 21:22:54 -0400 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2010-07-11 21:23:44 -0400 |
commit | b1bd21194433ce964c9af23979f69ab06e1d5319 (patch) | |
tree | 4fa5fadfa307ae3a0026f5f50183dcba64cc01c4 /etc | |
parent | 7abaeb1fa5fab8f9bf3bf6f745bc228938bcb5f1 (diff) | |
download | pfsense-b1bd21194433ce964c9af23979f69ab06e1d5319.zip pfsense-b1bd21194433ce964c9af23979f69ab06e1d5319.tar.gz |
only reload if relayd is already running, don't kill and then start it
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/vslb.inc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc index bb92e19..dcf30cf 100644 --- a/etc/inc/vslb.inc +++ b/etc/inc/vslb.inc @@ -261,16 +261,26 @@ function relayd_configure() { fclose($fd); if (is_process_running('relayd')) { - /* - * XXX: Something breaks our control connection with relayd and makes relayctl stop working - * rule reloads are the current suspect - * mwexec('/usr/local/bin/relayctl stop'); - */ - mwexec('pkill relayd'); - } - if (! empty($vs_a)) { - mwexec("/usr/local/sbin/relayd -f {$g['varetc_path']}/relayd.conf"); + if (! empty($vs_a)) { + // it's running and there is a config, just reload + mwexec("/usr/local/bin/relayctl reload"); + } else { + /* + * XXX: Something breaks our control connection with relayd + * and makes 'relayctl stop' not work + * rule reloads are the current suspect + * mwexec('/usr/local/bin/relayctl stop'); + * returns "command failed" + */ + mwexec('pkill relayd'); + } + } else { + if (! empty($vs_a)) { + // not running and there is a config, start it + mwexec("/usr/local/sbin/relayd -f {$g['varetc_path']}/relayd.conf"); + } } + } ?>
\ No newline at end of file |