📄 stop.cgi
字号:
#!/usr/local/bin/perl# stop.cgi# Stop the running apache serverrequire './apache-lib.pl';&ReadParse();&error_setup($text{'stop_err'});$access{'stop'} || &error($text{'stop_ecannot'});if ($config{'stop_cmd'}) { # use the configured stop command $out = `$config{'stop_cmd'} 2>&1`; if ($?) { &error("<tt>$out</tt>"); } }elsif (-x $config{'apachectl_path'}) { # use the apachectl program $out = `$config{'apachectl_path'} stop 2>&1`; if ($out !~ /httpd stopped/) { &error("<tt>$out</tt>"); } }else { # kill the process $conf = &get_config(); $pidfilestr = &find_directive_struct("PidFile", $conf); $pidfile = $pidfilestr ? $pidfilestr->{'words'}->[0] : "logs/httpd.pid"; $pidfile = &server_root($pidfile, $conf); open(PID, $pidfile) || &error(&text('stop_epid', $pidfile)); <PID> =~ /(\d+)/ || &error(&text('stop_epid2', $pidfile)); close(PID); kill('TERM', $1) || &error(&text('stop_esig', $1)); }sleep(1);&redirect($in{'redir'});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -