#!/usr/local/bin/perl
# restart.cgi
# Restart the running squid process

require './squid-lib.pl';
&ReadParse();
&error_setup($text{'restart_ftrs'});
if ($config{'squid_restart'}) {
	$out = &backquote_logged("$config{'squid_restart'} 2>&1");
	if ($?) { &error("<pre>$out</pre>"); }
	}
else {
	$out = &backquote_logged("$config{'squid_path'} -f $config{'squid_conf'} -k reconfigure 2>&1");
	if ($out && $out !~ /warning/i) { &error("<pre>$out</pre>"); }
	}
&webmin_log("apply");
&redirect($in{'redir'});

