equal
deleted
inserted
replaced
81 my $changed; |
81 my $changed; |
82 my ( $dd, $mm, $yy ) = ( localtime() )[ 3 .. 5 ]; |
82 my ( $dd, $mm, $yy ) = ( localtime() )[ 3 .. 5 ]; |
83 my $date; |
83 my $date; |
84 $mm++; |
84 $mm++; |
85 |
85 |
86 |
|
87 # fuehrt automatische aktuallisierungen der zonen durch |
|
88 system "$dnssec_sign"; |
|
89 |
|
90 # prueft jede domain, die ein verzeichnis in $master_dir hat, ob sie |
86 # prueft jede domain, die ein verzeichnis in $master_dir hat, ob sie |
91 # dnssec nutzt. |
87 # dnssec nutzt. |
92 # passt die eintraege in $config_file falls noetig an. |
88 # passt die eintraege in $config_file falls noetig an. |
93 while (<$master_dir/*>) { |
89 while (<$master_dir/*>) { |
94 s#($master_dir/)(.*)#$2#; |
90 s#($master_dir/)(.*)#$2#; |
221 print " $file: no serial number found: no zone file?"; |
217 print " $file: no serial number found: no zone file?"; |
222 } |
218 } |
223 print "\n"; |
219 print "\n"; |
224 } |
220 } |
225 |
221 |
226 if ($changed) { |
222 my $pidfile; |
227 my $pidfile; |
223 |
228 |
224 print |
229 |
225 "** Changed $changed files, the nameserver needs to be reloaded!\n"; |
|
226 foreach ( |
|
227 qw(/var/run/bind/run/named.pid /var/run/named.pid /etc/named.pid)) |
|
228 { |
|
229 -f $_ and $pidfile = $_ and last; |
|
230 } |
|
231 |
|
232 # dnssec-sign aufruf fuer geanderten domains |
|
233 system "$dnssec_sign @change_names"; |
|
234 die "$dnssec_sign not found ($!)" if $? == -1; |
|
235 exit 1 if $?; |
|
236 |
|
237 if ($pidfile) { |
|
238 if ($opt_yes) { |
|
239 $_ = "y"; |
|
240 print "** Nameserver will be reloaded\n"; |
|
241 } |
|
242 else { print "** Reload now? [Y/n]: "; $_ = <STDIN>; } |
|
243 /^y|^$/i and system "rndc reload"; |
|
244 } |
|
245 else { |
230 print |
246 print |
231 "** Changed $changed files, the nameserver needs to be reloaded!\n"; |
247 "** No PID of a running named found. Please reload manually.\n"; |
232 foreach ( |
248 |
233 qw(/var/run/bind/run/named.pid /var/run/named.pid /etc/named.pid)) |
249 } |
234 { |
250 |
235 -f $_ and $pidfile = $_ and last; |
251 } |
236 } |
252 |
237 |
|
238 # dnssec-sign aufruf fuer geanderten domains |
|
239 system "$dnssec_sign @change_names"; |
|
240 die "$dnssec_sign not found ($!)" if $? == -1; |
|
241 exit 1 if $?; |
|
242 |
|
243 if ($pidfile) { |
|
244 if ($opt_yes) { |
|
245 $_ = "y"; |
|
246 print "** Nameserver will be reloaded\n"; |
|
247 } |
|
248 else { print "** Reload now? [Y/n]: "; $_ = <STDIN>; } |
|
249 /^y|^$/i and system "rndc reload"; |
|
250 } |
|
251 else { |
|
252 print |
|
253 "** No PID of a running named found. Please reload manually.\n"; |
|
254 } |
|
255 |
|
256 } |
|
257 |
|
258 } |
|
259 |
|