From 689c5e58f88410d97d7e5505a484481a2560dd93 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Sat, 13 Mar 2021 16:37:59 +0300 Subject: [PATCH] Fix listen mode logic --- config | 2 +- config-CentOS-Linux-7.0-ALL | 2 +- config-Redhat-Enterprise-Linux-7.0-ALL | 2 +- config-Scientific-Linux-7.0-ALL | 2 +- config-debian-linux | 2 +- config-redhat-linux | 2 +- virtual_feature.pl | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config b/config index dc514e0..f53e3b4 100644 --- a/config +++ b/config @@ -5,5 +5,5 @@ stop_cmd=killall nginx apply_cmd=killall nginx ; sleep 1 ; /usr/local/nginx/sbin/nginx >/dev/null 2>&1 [ &domain_server_names($d) ] }); # Add listen on the correct IP and port - if ($config{'listen_mode'}) { + if ($config{'listen_mode'} eq '0') { # Just use port numbers push(@{$server->{'members'}}, { 'name' => 'listen', @@ -892,7 +892,7 @@ sub feature_validate $d->{'web_port'} == 80 || $l =~ /^\Q$d->{'ip'}\E:(\d+)$/ && $d->{'web_port'} == $1); - $found++ if ($l eq $d->{'web_port'} && $config{'listen_mode'}); + $found++ if ($l eq $d->{'web_port'} && $config{'listen_mode'} eq '0'); } $found || return &text('feat_evalidateip', $d->{'ip'}, $d->{'web_port'}); @@ -904,7 +904,7 @@ sub feature_validate $l =~ /^\[\Q$d->{'ip6'}\E\]:(\d+)$/ && $d->{'web_port'} == $1); $found6++ if ($l eq $d->{'web_port'} && - $config{'listen_mode'}); + $config{'listen_mode'} eq '0'); } $found6 || return &text('feat_evalidateip6', $d->{'ip6'}, $d->{'web_port'});