Increment backend port also when commented

This allows to grep the incremented port also for other backends then php-fpm with `%backend_lsnr%` in the web template.
This commit is contained in:
Henri Hulski 2018-12-17 19:41:37 +01:00
commit 95a345f2dc
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ fi
# Allocating backend port
backend_port=9000
ports=$(grep -v '^;' $pool/* 2>/dev/null |grep listen |grep -o :[0-9].*)
ports=$(grep listen $pool/* 2>/dev/null |grep -o :[0-9].*)
ports=$(echo "$ports" |sed "s/://" |sort -n)
for port in $ports; do
if [ "$backend_port" -eq "$port" ]; then