mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
14 lines
315 B
PHP
14 lines
315 B
PHP
<?php
|
|
|
|
require '../../includes/csrf.php';
|
|
require_once '../../includes/config.php';
|
|
require_once '../../includes/functions.php';
|
|
|
|
if (isset($_POST['logfile'])) {
|
|
$logfile = $_POST['logfile'];
|
|
|
|
// truncate requested log file
|
|
exec("sudo truncate -s 0 $logfile", $return);
|
|
echo json_encode($return);
|
|
}
|