ius/local.pm
changeset 26 69db99842596
parent 25 2a7ec071b455
equal deleted inserted replaced
25:2a7ec071b455 26:69db99842596
     1 # Example
     1 # Example
     2 # $Id$
     2 # $Id$
     3 # $URL$
     3 # $URL$
     4 
     4 
     5 # remove the next line if you know, what you're doing
     5 # remove the next line if you know, what you're doing
     6 die "Sure?  You should adapt this file to your needs!";
     6 #die "Sure?  You should adapt this file to your needs!";
     7 
     7 
     8 package local;
     8 package local;
     9 
     9 
    10 # in:	zone name
    10 # in:	zone name
    11 #       src ip
    11 #       src ip
    56     print OUT $txt;
    56     print OUT $txt;
    57 
    57 
    58     close OUT;
    58     close OUT;
    59 
    59 
    60     # return 0 == system("rndc reload");
    60     # return 0 == system("rndc reload");
    61     local @ARGV = qw(/var/run/bind/run/named.pid);
    61     local @ARGV = qw(/var/run/named/named.pid);
    62     chomp($_ = <>);
    62     chomp($_ = <>);
    63     warn "Sending HUP to $_\n";
    63     warn "Sending HUP to $_\n";
    64     $@ = "Nameserver reloaded (HUP sent)";
    64     $@ = "Nameserver reloaded (HUP sent)";
    65     kill "HUP", $_ and return 1;
    65     kill "HUP", $_ and return 1;
    66 
    66