mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Offer possibility to import auditlog.list from teleporter archive
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user