⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dns_boot.cgi

📁 BIND 9 dynamic DNS webmin module. This module supports both static and dynamic zones, and IPv4 and I
💻 CGI
字号:
#! /usr/bin/perl##    B9DDNS - BIND 9 dynamic DNS webmin module.#    Copyright (C) 2003 John Horne. <john.horne@plymouth.ac.uk>#    Copyright (C) 2004 John Horne. <john.horne@plymouth.ac.uk>##    This program is free software; you can redistribute it and/or modify#    it under the terms of the GNU General Public License as published by#    the Free Software Foundation; either version 2 of the License, or#    (at your option) any later version.##    This program is distributed in the hope that it will be useful,#    but WITHOUT ANY WARRANTY; without even the implied warranty of#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#    GNU General Public License for more details.##    You should have received a copy of the GNU General Public License#    along with this program; if not, write to the Free Software#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.### Create an empty named.conf file and start the name server.#use strict;no strict 'vars';require './b9ddns-lib.pl';my $conf_directory = my $conf_file = my $conf_temp = '';my $pid_file = my $err = '';&ReadParse();$conf_directory = ($config{'master_dir'} ? $config{'master_dir'} : '/var/named');$pid_file = $config{'pid_file'} || '/var/run/named.pid';$conf_file = $config{'chroot'} . $config{'named_conf'};&lock_file($conf_file);$conf_temp = &tempname('webmin.named.conf');if (open(BOOT, ">$conf_temp")) {	print BOOT "options {\n";	print BOOT "\tdirectory \"$conf_directory\";\n";	print BOOT "\tpid-file \"$pid_file\";\n";	print BOOT "\t};\n";	print BOOT "\n";	close(BOOT);}else {	$err = $!;	&terror('boot_open_err', $err);}$conf_directory = $config{'chroot'} . $conf_directory;unless (-d $conf_directory) {	mkdir($conf_directory, 0755);	&set_ownership($conf_directory, 1);}if ($pid_file =~ /^(\S+)\/[^\/\s]+$/o) {	$pid_file = $config{'chroot'} . $1;	unless (-d $pid_file) {		mkdir($pid_file, 0755);		&set_ownership($pid_file, 1);	}}system("cp $conf_temp $conf_file 2>/dev/null");unlink $conf_temp;&unlock_file($conf_file);&set_ownership($conf_file, 0);&webmin_log('boot');&redirect('start_named.cgi?start=1');exit;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -