mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 03:10:18 +01: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");
|
||||
|
||||
Reference in New Issue
Block a user