Offer possibility to import auditlog.list from teleporter archive

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-08-10 18:25:12 +02:00
parent 97055e4223
commit 78d262d7b0
2 changed files with 13 additions and 0 deletions

View File

@@ -143,6 +143,14 @@ if(isset($_POST["action"]))
$importedsomething = true;
}
if(isset($_POST["auditlog"]) && $file->getFilename() === "auditlog.list")
{
$auditlog = process_file(file_get_contents($file));
echo "Processing auditlog.list (".count($auditlog)." entries)<br>\n";
exec("sudo pihole -a clearaudit");
exec("sudo pihole -a audit ".implode(" ",$auditlog));
}
if($importedsomething)
{
exec("sudo pihole restartdns");

View File

@@ -1099,6 +1099,11 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
checked>
Regex filters</label>
</div>
<div class="checkbox">
<label><input type="checkbox" name="auditlog" value="true"
checked>
Audit log</label>
</div>
</div>
</div>
<div class="col-lg-6 col-md-12">