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

📄 save_logs.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# save_logs.cgi# Save logging optionsrequire './squid-lib.pl';&ReadParse();$conf = &get_config();$whatfailed = "Failed to save logging options";&save_opt("cache_access_log", \&check_file, $conf);&save_opt("cache_log", \&check_file, $conf);&save_opt("cache_store_log", \&check_file, $conf);&save_opt("cache_swap_log", \&check_file, $conf);&save_choice("emulate_httpd_log", "off", $conf);&save_choice("log_mime_hdrs", "off", $conf);&save_opt("useragent_log", \&check_file, $conf);&save_opt("pid_filename", \&check_file, $conf);if ($squid_version >= 2.2) {	if (!$in{'complex_ident'}) {		local @ila = split(/\0/, $in{'ident_lookup_access'});		&save_directive($conf, "ident_lookup_access", !@ila ? [ ] :				[ { 'name' => 'ident_lookup_access',				    'values' => [ 'allow', @ila ] } ]);		}	&save_opt_time("ident_timeout", $conf);	}else {	&save_choice("ident_lookup", "off", $conf);	}&save_opt("client_netmask", \&check_netmask, $conf);&save_opt("debug_options", \&check_debug, $conf);if ($squid_version >= 2) {	&save_opt("mime_table", \&check_file, $conf);	}&flush_file_lines();&redirect("");sub check_file{$_[0] =~ /^\// || return "'$_[0]' is not an abolute filename";$_[0] =~ /^(\S*\/)([^\/\s]+)$/ || return "'$_[0]' is not a valid filename";(-d $1) || return "The directory '$1' does not exist";return undef;}sub check_netmask{&check_ipaddress($_[0]) || return "'$_[0]' is not a valid netmask";return undef;}sub check_debug{$_[0] =~ /^\S+$/ || return "'$_[0]' is not a valid debug options list";return undef;}

⌨️ 快捷键说明

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