1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00
raspap-webgui/ajax/logging/clearlog.php
2022-09-26 20:53:06 +01:00

13 lines
291 B
PHP

<?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);
}