mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #816 from pi-hole/tweak/teleporter_auditlist
Offer possibility to import auditlog.list from teleporter archive
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