MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/libexec/webmin/squid/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/libexec/webmin/squid/start.cgi
#!/usr/bin/perl
# start.cgi
# Start squid

require './squid-lib.pl';
$access{'start'} || &error($text{'start_ecannot'});
use POSIX;
&ReadParse();
$whatfailed = $text{'start_ftsq'};
$temp = &transname();
&clean_environment();
if ($config{'squid_start'}) {
	# Use a start script
	$rv = &system_logged("$config{'squid_start'} >$temp 2>&1 </dev/null");
	sleep(5);
	$errs = `cat $temp`;
	unlink($temp);
	&reset_environment();
	if ($errs && $errs =~ /\d+\/\d+\/\d+/) {
		&system_logged("$config{'squid_stop'} >/dev/null 2>&1 </dev/null");
		&error("<pre>$errs</pre>");
		}
	}
else {
	# Run the squid executable directly
	&system_logged("cd / ; $config{'squid_path'} -sY -f $config{'squid_conf'} >$temp 2>&1 </dev/null &");
	sleep(5);
	$errs = `cat $temp`;
	unlink($temp);
	&reset_environment();
	if ($errs) {
		&backquote_logged("$config{'squid_path'} -k shutdown -f $config{'squid_conf'} 2>&1 </dev/null");
		&error("<pre>$errs</pre>");
		}
	}
&webmin_log("start");
&redirect($in{'redir'});


Anon7 - 2021