Initial commit

This commit is contained in:
billz 2022-09-26 20:53:06 +01:00
parent ee3de983ab
commit cbdc5a11e5
1 changed files with 12 additions and 0 deletions

12
ajax/logging/clearlog.php Normal file
View File

@ -0,0 +1,12 @@
<?php
require_once '../../includes/config.php';
require_once '../../includes/functions.php';
if (isset($_POST['svc'])) {
$tmplog = '/tmp/' .$_POST['svc']. '.log';
// clear log for requested service
exec("sudo truncate -s 0 $tmplog", $return);
echo json_encode($return);
}