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 :  /proc/self/root/usr/libexec/webmin/logrotate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/libexec/webmin/logrotate/edit_sched.cgi
#!/usr/bin/perl
# edit_sched.cgi
# Find the logrotate cron job, or offer to create one

require './logrotate-lib.pl';
&ui_print_header(undef, $text{'sched_title'}, "");

print "<p>",&text('sched_desc', "<tt>$config{'logrotate'}</tt>"),"<p>\n";

# Find the job, looking in daily directories too
&foreign_require("cron", "cron-lib.pl");
@jobs = &cron::list_cron_jobs();
JOB: foreach $j (@jobs) {
	if ($j->{'command'} =~ /logrotate/i) {
		$job = $j;
		last JOB;
		}
	local $rpd = &cron::is_run_parts($j->{'command'});
	if ($rpd) {
		local @exp = &cron::expand_run_parts($rpd);
		foreach $e (@exp) {
			if ($e =~ /logrotate/i && -r $e) {
				$job = $j;
				$runparts = $e;
				last JOB;
				}
			}
		}
	}

if ($runparts) {
	# Run from run-parts command, cannot touch
	print &text('sched_runparts', "<tt>$runparts</tt>",
		    &cron::when_text($job)),"<p>\n";
	}
else {
	# Offer to enable/change/delete
	print "<form action=save_sched.cgi>\n";
	print "<input type=hidden name=idx value='",
		$job ? $job->{'index'} : "","'>\n";
	print "<b>$text{'sched_sched'}</b>\n";
	printf "<input type=radio name=sched value=0 %s> %s\n",
		$job ? "" : "checked", $text{'sched_disabled'};
	printf "<input type=radio name=sched value=1 %s> %s<br>\n",
		$job ? "checked" : "", $text{'sched_enabled'};

	$job ||= { 'special' => 'daily' };
	print "<table border>\n";
	&cron::show_times_input($job);
	print "</table>\n";
	print "<input type=submit value='$text{'sched_save'}'></form>\n";
	}

&ui_print_footer("", $text{'index_return'});

Anon7 - 2021