Merge pull request #816 from pi-hole/tweak/teleporter_auditlist

Offer possibility to import auditlog.list from teleporter archive
This commit is contained in:
Mark Drobnak
2018-08-10 18:06:57 -04:00
committed by GitHub
2 changed files with 13 additions and 0 deletions
+8
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");
+5
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">