3 # Run the squid cachemgr.cgi program
5 require './squid-lib.pl';
6 $access{'cms'} || &error($text{'cach_ecannot'});
7 ($mgr) = glob($config{'cachemgr_path'});
8 &same_file($0, $mgr) && &error($text{'cach_esame'});
9 if (&has_command($mgr)) {
11 if ($ENV{'REQUEST_METHOD'} eq 'POST') {
13 &read_fully(STDIN, \$post, $ENV{'CONTENT_LENGTH'});
18 open(MGR, "$mgr ".join(" ", @ARGV)." <$temp |");
21 open(MGR, "$mgr ".join(" ", @ARGV)." |");
27 unlink($temp) if ($temp);
30 &ui_print_header(undef, $text{'cach_err'}, "");
31 print &text('cach_nfound',$mgr,$module_name);
34 &ui_print_footer("", $text{'cach_return'});