mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +03:00
Allow viewing of past logs.
Add a command-line PHP script for rotation in cron.
This commit is contained in:
parent
56c1789b30
commit
f081d96b0c
4 changed files with 88 additions and 9 deletions
16
rotate-logs.php
Normal file
16
rotate-logs.php
Normal 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');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue