diff options
-rw-r--r-- | net/balance/Makefile | 1 | ||||
-rw-r--r-- | net/balance/files/balance.sh.in | 21 |
2 files changed, 19 insertions, 3 deletions
diff --git a/net/balance/Makefile b/net/balance/Makefile index 782e8e6ced99..0638601bb22f 100644 --- a/net/balance/Makefile +++ b/net/balance/Makefile @@ -7,6 +7,7 @@ PORTNAME= balance PORTVERSION= 3.42 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.inlab.de/ \ ${MASTER_SITE_SOURCEFORGE_EXTENDED} diff --git a/net/balance/files/balance.sh.in b/net/balance/files/balance.sh.in index 53b1bf0382c0..fc5892ec2ca7 100644 --- a/net/balance/files/balance.sh.in +++ b/net/balance/files/balance.sh.in @@ -38,8 +38,11 @@ start_cmd() eval flags=\"\${balance_${host}_flags}\" eval address=\"\${balance_${host}_address}\" eval targets=\"\${balance_${host}_targets}\" + if [ "" != "${address}" ]; then + flags="${flags} -b ${address}" + fi for port in ${ports}; do - "${command}" ${flags} -b ${address} ${port} ${targets} + "${command}" ${flags} ${port} ${targets} done done fi @@ -51,9 +54,15 @@ stop_cmd() for host in ${balance_hosts}; do eval ports=\"\${balance_${host}_ports}\" eval address=\"\${balance_${host}_address}\" + flags="" + if [ "" != "${address}" ]; then + flags="-b ${address}" + else + address='*' + fi for port in ${ports}; do echo "balance at ${address}:${port}" - "${command}" -b ${address} -c kill ${port} + "${command}" ${flags} -c kill ${port} done done fi @@ -65,9 +74,15 @@ status_cmd() for host in ${balance_hosts}; do eval ports=\"\${balance_${host}_ports}\" eval address=\"\${balance_${host}_address}\" + flags="" + if [ "" != "${address}" ]; then + flags="-b ${address}" + else + address='*' + fi for port in ${ports}; do echo "balance at ${address}:${port}" - "${command}" -b ${address} -c show ${port} + "${command}" ${flags} -c show ${port} done done fi |