Files
webmin/bind8/stop.cgi
Ilia Rostovtsev 24267b8afd Redirec to exact URL ..
..otherwise, every second click on the link from the same page, will result in 'too many redirects' error, as referer will equal initial restart target on the second go, ending-up broken
2020-05-23 15:54:53 +03:00

19 lines
500 B
Perl
Executable File

#!/usr/local/bin/perl
# Stop bind 8
require './bind8-lib.pl';
&ReadParse();
$access{'ro'} && &error($text{'stop_ecannot'});
$access{'apply'} || &error($text{'stop_ecannot'});
$err = &stop_bind();
&error($err) if ($err);
&webmin_log("stop");
my $redir_targ = ($in{'type'} eq "master" ? "edit_master.cgi" :
$in{'type'} eq "forward" ? "edit_forward.cgi" : "edit_slave.cgi");
my $zone;
if ($in{'zone'}) {
$zone = "?zone=$in{'zone'}";
}
&redirect($zone && $in{'return'} ? "$redir_targ$zone" : "");