Review comments

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-07-24 19:41:04 +02:00
parent 3ebf766240
commit cd2daa3239
2 changed files with 3 additions and 29 deletions

View File

@@ -45,21 +45,4 @@ if(!function_exists('hash_equals')) {
}
}
function add_regex($regex, $mode=FILE_APPEND, $append="\n")
{
global $regexfile;
if(file_put_contents($regexfile, $regex.$append, $mode) === FALSE)
{
$err = error_get_last()["message"];
echo "Unable to add regex \"".htmlspecialchars($regex)."\" to ${regexfile}<br>Error message: $err";
}
else
{
// Send SIGHUP to pihole-FTL using a frontend command
// to force reloading of the regex domains
// This will also wipe the resolver's cache
echo exec("sudo pihole restartdns reload");
}
}
?>