📄 dns_boot.cgi
字号:
#!/usr/local/bin/perl# dns_boot.cgi# Create an empty named.boot file and start the name serverrequire './dns-lib.pl';$whatfailed = "Download failed";&ReadParse;$config{'named_boot_file'} =~ /^(\/[^\/]+)/;$named_boot_directory = $1;$boot_temp = "/tmp/webmin.named.boot";open(BOOT, "> $boot_temp");print BOOT "directory $named_boot_directory\n";if ($in{real} == 0) { # Create an empty root domain file... no need to do anything here }elsif ($in{real} == 1) { # Try to download the root servers file from # ftp://rs.internic.net/domain/named.root &ftp_download("rs.internic.net", "/domain/named.root", "$named_boot_directory/db.cache"); print BOOT "cache\t\t.\tdb.cache\n"; }elsif ($in{real} == 2) { # Use builtin db.cache system("cp ./db.cache $named_boot_directory/db.cache 2>/dev/null"); print BOOT "cache\t\t.\tdb.cache\n"; }close(BOOT);system("cp $boot_temp $config{'named_boot_file'} 2>/dev/null");unlink($boot_temp);system("$config{'named_pathname'} >/dev/null 2>/dev/null");redirect("");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -