diff options
Diffstat (limited to 'proxy_wizard')
-rwxr-xr-x | proxy_wizard/Squid.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm index ebcd2dfc..662974fc 100755 --- a/proxy_wizard/Squid.pm +++ b/proxy_wizard/Squid.pm @@ -208,8 +208,7 @@ sub network_mask { sub testport { if (member($o->{var}{wiz_squid_port}, qw(3128 8080))) { return ''; - } - elsif ($o->{var}{wiz_squid_port} <= 1024 || $o->{var}{wiz_squid_port} >= 65536) { + } elsif ($o->{var}{wiz_squid_port} <= 1024 || $o->{var}{wiz_squid_port} >= 65536) { return 'error_low'; } $o->{var}{used_by} = `/bin/grep $o->{var}{wiz_squid_port} /etc/services`; @@ -247,14 +246,12 @@ level = $o->{var}{wiz_squid_level}"); substInFile { s|^\s*#?\s*(http_access\s*)deny(\s*all.*)|#$&\n$1allow$2|; } $file; - } - elsif ($o->{var}{wiz_squid_level} == 2) { + } elsif ($o->{var}{wiz_squid_level} == 2) { substInFile { s|^\s*#?\s*(http_access\s*)allow(\s*all.*)|#$&\n$1deny$2|; s|^\s*#?\s*(http_access\s*allow\s*)localhost|#$&\n$1mynetwork|; } $file; - } - elsif ($o->{var}{wiz_squid_level} == 3) { + } elsif ($o->{var}{wiz_squid_level} == 3) { substInFile { s|^\s*#?\s*(http_access\s*)allow(\s*all.*)|#$&\n$1deny$2|; s|^\s*#?\s*(http_access\s*allow\s*)mynetwork|#$&\n$1localhost|; @@ -267,8 +264,7 @@ level = $o->{var}{wiz_squid_level}"); substInFile { s|^\s*!#\s*(cache_peer.*)|#$&|; } $file; - } - elsif ($o->{var}{wiz_squid_menupeer} == 2 && length $o->{var}{wiz_squid_cachepeer}) { + } elsif ($o->{var}{wiz_squid_menupeer} == 2 && length $o->{var}{wiz_squid_cachepeer}) { if (length($t)) { substInFile { s|^\s*#?\s*(cache_peer.*)|#$&|; |