3 # Stop the running squid process
5 require './squid-lib.pl';
6 $access{'start'} || &error($text{'stop_ecannot'});
8 $whatfailed = $text{'stop_ftsq'};
9 if ($config{'squid_stop'}) {
11 $out = &backquote_logged("$config{'squid_stop'} 2>&1");
12 if ($out && $out =~ /\d+\/\d+\/\d+/) {
13 &error("<pre>$out</pre>");
17 # Run the squid executable directly
18 $out = &backquote_logged("$config{'squid_path'} -f $config{'squid_conf'} -k shutdown 2>&1");
19 if ($out) { &error("<pre>$out</pre>"); }
21 for($i=0; $i<40; $i++) {
22 if (!kill(0, $in{'pid'})) { last; }
26 &redirect($in{'redir'});