mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 13:09:58 -06:00
26 lines
973 B
PHP
26 lines
973 B
PHP
<?PHP
|
|
/* Copyright 2005-2020, Lime Technology
|
|
* Copyright 2012-2020, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<?
|
|
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
|
require_once "$docroot/webGui/include/Wrappers.php";
|
|
|
|
$dynamix = parse_plugin_cfg('dynamix',true);
|
|
$killfiles = [];
|
|
if (strpos($_POST['log'],'*')===false) $killfiles = [ realpath("{$dynamix['notify']['path']}/archive/{$_POST['log']}") ]; else $killfiles = glob("{$dynamix['notify']['path']}/archive/{$_POST['log']}",GLOB_NOSORT);
|
|
foreach ($killfiles as $killfile) {
|
|
if (strpos($killfile, "{$dynamix['notify']['path']}/archive/") === 0) {
|
|
@unlink($killfile);
|
|
}
|
|
}
|
|
?>
|