Allow viewing of past logs.

Add a command-line PHP script for rotation in cron.
This commit is contained in:
Richard Underwood 2016-08-24 14:19:52 +01:00
parent 56c1789b30
commit f081d96b0c
4 changed files with 88 additions and 9 deletions

16
rotate-logs.php Normal file
View file

@ -0,0 +1,16 @@
<?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');
}
}