| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/logrotate/ |
Upload File : |
#!/usr/bin/perl
# Force log rotate
require './logrotate-lib.pl';
&ui_print_header(undef, $text{'force_title'}, "");
# Save this CGI from being killed by the rotation of Webmin's own logs
$SIG{'TERM'} = 'IGNORE';
print $text{'force_doing'},"\n";
&clean_environment();
$out = &backquote_logged("$config{'logrotate'} -f $config{'logrotate_conf'} 2>&1");
&reset_environment();
print "<pre>$out</pre>";
if ($?) {
print $text{'force_failed'},"<br>\n";
}
else {
print $text{'force_done'},"<br>\n";
}
&webmin_log("force");
&ui_print_footer("", $text{'index_return'});