nsedit/rotate-logs.php
Richard Underwood f081d96b0c Allow viewing of past logs.
Add a command-line PHP script for rotation in cron.
2016-08-24 14:19:52 +01:00

16 lines
421 B
PHP

<?php
include_once('includes/config.inc.php');
include_once('includes/session.inc.php');
include_once('includes/misc.inc.php');
if(php_sapi_name() !== 'cli') {
echo "This script is intended to be run from the command line";
} else {
if($allowrotatelogs === TRUE) {
$current_user['username']='<system>';
rotatelogs();
} else {
jtable_respond(null, 'error', 'Invalid action');
}
}