| Server IP : 45.162.171.154 / Your IP : 216.73.216.5 Web Server : Apache System : Linux vxct2015.avnam.net 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 User : lpg.com.ar ( 1041) PHP Version : 8.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl
# Delete several proxy balancers
require './virtual-server-lib.pl';
&ReadParse();
&licence_status();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) && &can_edit_forward() ||
&error($text{'balancers_ecannot'});
&has_proxy_balancer($d) || &error($text{'balancers_esupport'});
&error_setup($text{'balancers_derr'});
# Find them and delete them
@d = split(/\0/, $in{'d'});
@d || &error($text{'balancers_denone'});
&obtain_lock_web($d);
@balancers = &list_proxy_balancers($d);
foreach $path (@d) {
($b) = grep { $_->{'path'} eq $path } @balancers;
if ($b) {
$err = &delete_proxy_balancer($d, $b);
&error($err) if ($err);
}
}
# Log and return
&release_lock_web($d);
&set_all_null_print();
&run_post_actions();
&webmin_log("delete", "balancers", scalar(@d), { 'dom' => $d->{'dom'} });
&redirect("list_balancers.cgi?dom=$in{'dom'}");