mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Automatically restart DNS resolver when privacy level is lowered
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -687,8 +687,25 @@ function readAdlists()
|
||||
$level = intval($_POST["privacylevel"]);
|
||||
if($level >= 0 && $level <= 4)
|
||||
{
|
||||
// Check if privacylevel is already set
|
||||
if (isset($piholeFTLConf["PRIVACYLEVEL"])) {
|
||||
$privacylevel = intval($piholeFTLConf["PRIVACYLEVEL"]);
|
||||
} else {
|
||||
$privacylevel = 0;
|
||||
}
|
||||
|
||||
// Store privacy level
|
||||
exec("sudo pihole -a privacylevel ".$level);
|
||||
$success .= "The privacy level has been updated";
|
||||
|
||||
if($privacylevel > $level)
|
||||
{
|
||||
exec("sudo pihole -a restartdns");
|
||||
$success .= "The privacy level has been decreased and the DNS resolver has been restarted";
|
||||
}
|
||||
else
|
||||
{
|
||||
$success .= "The privacy level has been increased";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+1
-1
@@ -1070,7 +1070,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
|
||||
?>>No Statistics mode: This disables all statistics processing. Even the query counters will not be available.<br><strong>Note that regex blocking is not available when query analyzing is disabled.</strong><br>Additionally, you can disable logging to the file <code>/var/log/pihole.log</code> using <code>sudo pihole logging off</code>.</label>
|
||||
</div>
|
||||
</div>
|
||||
<p>The privacy level may be increased at any time without having to restart the DNS resolver. However, note that you need to restart the DNS resolver when lowering the privacy level.</p>
|
||||
<p>The privacy level may be increased at any time without having to restart the DNS resolver. However, note that the DNS resolver needs to be restarted when lowering the privacy level. This restarting is automatically done when saving.</p>
|
||||
<?php if($privacylevel > 0 && $piHoleLogging){ ?>
|
||||
<p class="lookatme">Warning: Pi-hole's query logging is activated. Although the dashboard will hide the requested details, all queries are still fully logged to the pihole.log file.</p>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user