aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-dev/haproxy.inc
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-02-12 17:51:40 +1300
committerthompsa <andy@fud.org.nz>2010-02-13 09:16:35 +1300
commit101e95d3d9c14d08c716466378a05af19e703c5d (patch)
treea4609549b97fc59a7d785f4289140ac44bf16711 /config/haproxy-dev/haproxy.inc
parent218f9357a9dd257ec7ddb2162234b483589d9164 (diff)
downloadpfsense-packages-101e95d3d9c14d08c716466378a05af19e703c5d.tar.gz
pfsense-packages-101e95d3d9c14d08c716466378a05af19e703c5d.tar.bz2
pfsense-packages-101e95d3d9c14d08c716466378a05af19e703c5d.zip
Add backup option to the backend servers
Diffstat (limited to 'config/haproxy-dev/haproxy.inc')
-rw-r--r--config/haproxy-dev/haproxy.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc
index e6365a7d..a799cd48 100644
--- a/config/haproxy-dev/haproxy.inc
+++ b/config/haproxy-dev/haproxy.inc
@@ -336,7 +336,12 @@ function haproxy_configure() {
}
if (!$be['name'])
$be['name'] = $be['address'];
- fwrite ($fd, "\tserver\t\t\t" . $be['name'] . " " . $be['address'].":" . $be['port'] . " $cookie " . " $checkinter weight " . $be['weight'] . "{$advanced_txt}\n");
+ if($be['backup']) {
+ $isbackup = "backup";
+ } else {
+ $isbackup = "";
+ }
+ fwrite ($fd, "\tserver\t\t\t" . $be['name'] . " " . $be['address'].":" . $be['port'] . " $cookie " . " $checkinter $isbackup weight " . $be['weight'] . "{$advanced_txt}\n");
}
}