Skip to content

Commit

Permalink
perl warnings fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jul 28, 2017
1 parent c6d1863 commit b16b3e7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,11 @@ sub feature_setup
my @listen = &virtualmin_nginx::find("listen", $server);
my ($old_ip4) = grep { $_->{'words'}->[0] eq
$d->{'ip'}.":".$d->{'web_sslport'} } @listen;
my ($old_ip6) = grep { $_->{'words'}->[0] eq
my $old_ip6;
if ($d->{'ip6'}) {
($old_ip6) = grep { $_->{'words'}->[0] eq
"[".$d->{'ip6'}."]:".$d->{'web_sslport'} } @listen;
}
my @sslopts;
if (!&find_listen_clash($d->{'ip'}, $d->{'web_sslport'})) {
push(@sslopts, 'default', 'ssl');
Expand Down Expand Up @@ -249,9 +252,10 @@ sub feature_setup

# Add this IP and cert to Webmin/Usermin's SSL keys list
my %vinfo = &get_module_info("virtual-server");
my $canipkeys = $d->{'virt'} || $vinfo{'version'} >= 5.08;
my $rwfunc = $vinfo{'version'} >= 5.08 ? \&virtual_server::restart_webmin_fully
: \&virtual_server::restart_webmin;
my $nv = &compare_version_numbers($vinfo{'version'}, 5.08) >= 0;
my $canipkeys = $d->{'virt'} || $nv;
my $rwfunc = $nv ? \&virtual_server::restart_webmin_fully
: \&virtual_server::restart_webmin;
if ($tmpl->{'web_webmin_ssl'} && $canipkeys) {
&virtual_server::setup_ipkeys($d,
\&get_miniserv_config,
Expand Down Expand Up @@ -447,8 +451,9 @@ sub feature_delete

# Delete per-IP SSL cert
my %vinfo = &get_module_info("virtual-server");
my $rwfunc = $vinfo{'version'} >= 5.08 ? \&virtual_server::restart_webmin_fully
: \&virtual_server::restart_webmin;
my $nv = &compare_version_numbers($vinfo{'version'}, 5.08) >= 0;
my $rwfunc = $nv ? \&virtual_server::restart_webmin_fully
: \&virtual_server::restart_webmin;
&virtual_server::delete_ipkeys($d,
\&get_miniserv_config,
\&put_miniserv_config,
Expand Down

0 comments on commit b16b3e7

Please sign in to comment.