summaryrefslogtreecommitdiffstats
path: root/etc/inc/vslb.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-24 21:14:25 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-24 21:14:25 +0000
commit098947479721ab84452799a0a515a234b11af9de (patch)
tree84f044062cbe93c03fd3fce8153aa8ca8a94f1df /etc/inc/vslb.inc
parent557228e44fca7d833924374b4f59412db7721b4b (diff)
downloadpfsense-098947479721ab84452799a0a515a234b11af9de.zip
pfsense-098947479721ab84452799a0a515a234b11af9de.tar.gz
Allow SLBD to start.
Diffstat (limited to 'etc/inc/vslb.inc')
-rw-r--r--etc/inc/vslb.inc26
1 files changed, 15 insertions, 11 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index 4a329fe..e341560 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -35,14 +35,11 @@ require_once("notices.inc");
function slbd_configure() {
global $config, $g;
-
- /* no need to go further if we don't have any load balance stuff */
- if ((!is_array($config['load_balancer'])) || (!is_array($config['load_balancer']['pool'])))
- return;
-
+
$a_vs = &$config['load_balancer']['virtual_server'];
$a_pool = &$config['load_balancer']['pool'];
+ $should_start=0;
$fd = fopen("{$g['varetc_path']}/slbd.conf", "w");
@@ -78,12 +75,19 @@ function slbd_configure() {
}
$slbdconf .= "\t:tcppoll:send=:expect=:\n";
+
+ $should_start=1;
+ }
+
+ if($should_start == 1) {
+ fwrite($fd, $slbdconf);
+ fclose($fd);
+ mwexec("/usr/bin/pkill -9 slbd");
+ /* 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 {
+ fclose($fd);
}
- fwrite($fd, $slbdconf);
- fclose($fd);
- mwexec("/usr/bin/pkill -9 slbd");
- /* 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");
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud