diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index 6dc4587f..0f0ff1e8 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -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 { diff --git a/settings.php b/settings.php index 39393c6a..73061e38 100644 --- a/settings.php +++ b/settings.php @@ -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.
Note that regex blocking is not available when query analyzing is disabled.
Additionally, you can disable logging to the file /var/log/pihole.log using sudo pihole logging off. -

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.

+

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.

0 && $piHoleLogging){ ?>

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.