Server IP : 195.201.23.43 / Your IP : 18.222.97.243 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl # Set the TTL on all records in a domain require './virtual-server-lib.pl'; &error_setup($text{'transfer_err2'}); &ReadParse(); my $d = &get_domain($in{'dom'}); $d || &error($text{'edit_egone'}); &can_edit_domain($d) || &error($text{'edit_ecannot'}); &can_edit_records($d) || &error($text{'records_ecannot'}); $in{'newttl'} =~ /^\d+$/ || &error($text{'transfer_enewttl'}); # Update default TTL &obtain_lock_dns($d); &pre_records_change($d); my ($recs, $file) = &get_domain_dns_records_and_file($d); my ($oldttl) = grep { $_->{'defttl'} } @$recs; if ($oldttl) { $oldttl->{'defttl'} = $in{'newttl'}; &modify_dns_record($recs, $file, $oldttl); } else { my $newttl = { 'defttl' => $in{'newttl'} }; &create_dns_record($recs, $file, $newttl); } # Update records foreach my $r (@$recs) { if ($r->{'ttl'} && $r->{'type'} ne 'SOA' && !&is_dnssec_record($r)) { $r->{'ttl'} = $in{'newttl'}; &modify_dns_record($recs, $file, $r); } } &post_records_change($d, $recs, $file); &reload_bind_records($d); $d->{'ttl_change_time'} = time(); $d->{'ttl_change_from'} = $in{'oldttl'}; &save_domain($d); &release_lock_dns($d); &webmin_log("fixttl", "domain", $d->{'dom'}); &redirect("transfer_form.cgi?dom=$in{'dom'}");Private