Obsolete
/
dnsmanagerv1
Archived
3
0
Fork 0

bind9 => correction de rndc qui se lançait via sudo

master
karchnu 2015-11-20 20:13:59 +01:00
parent 167133ebcd
commit 0dc7cdea82
1 changed files with 5 additions and 2 deletions

View File

@ -10,8 +10,10 @@ sub reload {
my ($self, $domain) = @_; my ($self, $domain) = @_;
my $cmd = "rndc reload $domain"; my $cmd = "rndc reload $domain";
say "CMD: $cmd";
qx/$cmd/; qx/$cmd/;
$cmd = "rndc notify $domain"; $cmd = "rndc notify $domain";
say "CMD: $cmd";
qx/$cmd/; qx/$cmd/;
#my $cmd = "rndc reload $domain "; #my $cmd = "rndc reload $domain ";
@ -75,13 +77,14 @@ sub reconfig {
sub delzone { sub delzone {
my ($self, $domain) = @_; my ($self, $domain) = @_;
my $cmd = "sudo rndc delzone $domain "; my $cmd = "rndc delzone $domain ";
my $user = get_user_from_cfg($$self{mycfg}); my $user = get_user_from_cfg($$self{mycfg});
my $host = get_host_from_cfg($$self{mycfg}); my $host = get_host_from_cfg($$self{mycfg});
my $port = get_port_from_cfg($$self{mycfg}); my $port = get_port_from_cfg($$self{mycfg});
remotecmd $user, $host, $port, $cmd; #remotecmd $user, $host, $port, $cmd;
qx/$cmd/;
my $file = get_zonedir_from_cfg($$self{mycfg}); my $file = get_zonedir_from_cfg($$self{mycfg});
$file .= "/$domain"; $file .= "/$domain";