summaryrefslogtreecommitdiffstats
path: root/etc/inc/vslb.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-09-28 11:38:05 -0400
committerjim-p <jimp@pfsense.org>2011-09-28 11:39:49 -0400
commitd353423564517a5038f57996769cb488ec802d7a (patch)
tree4eb59f64116183414c362b6d863ffae664c1cadd /etc/inc/vslb.inc
parenta5566aa8a92b300381bba071cf40e37407d086c1 (diff)
downloadpfsense-d353423564517a5038f57996769cb488ec802d7a.zip
pfsense-d353423564517a5038f57996769cb488ec802d7a.tar.gz
Add relayd to Status > Services and widget. Add capability to kill when restarting instead of a simple reload. Implements #1913
Diffstat (limited to 'etc/inc/vslb.inc')
-rw-r--r--etc/inc/vslb.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index 54416b9..064438e 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -159,7 +159,7 @@ function echo_lbaction($action) {
return $ret;
}
-function relayd_configure() {
+function relayd_configure($kill_first=false) {
global $config, $g;
$vs_a = $config['load_balancer']['virtual_server'];
@@ -281,8 +281,13 @@ function relayd_configure() {
if (is_process_running('relayd')) {
if (! empty($vs_a)) {
- // it's running and there is a config, just reload
- mwexec("/usr/local/sbin/relayctl reload");
+ if ($kill_first) {
+ mwexec('pkill relayd');
+ mwexec("/usr/local/sbin/relayd -f {$g['varetc_path']}/relayd.conf");
+ } else {
+ // it's running and there is a config, just reload
+ mwexec("/usr/local/sbin/relayctl reload");
+ }
} else {
/*
* XXX: Something breaks our control connection with relayd
OpenPOWER on IntegriCloud