diff options
author | thompsa <andy@fud.org.nz> | 2010-02-08 00:20:46 +1300 |
---|---|---|
committer | thompsa <andy@fud.org.nz> | 2010-02-08 00:21:14 +1300 |
commit | 93865d388d8782e768e0a7f7d39d87c69f528084 (patch) | |
tree | eed6bd38ef0b8655c745163cc8dd22ad6cb87047 /config/haproxy-dev/haproxy.inc | |
parent | cacd273abbf3c0100f94bd59a6018593744c7b2c (diff) | |
download | pfsense-packages-93865d388d8782e768e0a7f7d39d87c69f528084.tar.gz pfsense-packages-93865d388d8782e768e0a7f7d39d87c69f528084.tar.bz2 pfsense-packages-93865d388d8782e768e0a7f7d39d87c69f528084.zip |
Add backend server name field.
Diffstat (limited to 'config/haproxy-dev/haproxy.inc')
-rw-r--r-- | config/haproxy-dev/haproxy.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 4ab000da..d6665f38 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -266,7 +266,9 @@ function haproxy_configure() { foreach($a_servers as $be) { if(!$be['port']) $be['port'] = $backend['port']; - fwrite ($fd, "\tserver\t\t\t" . $be['address'] . " " . $be['address'].":" . $be['port'] . " $cookie " . " $checkinter weight " . $be['weight'] . "{$advanced_txt}\n"); + 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"); } } } |