From fc156f521ccce13449cfefeffe28f21762daa53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 10 Aug 2024 13:15:34 +0200 Subject: [PATCH] Fix setting query logging and privacy level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- automated install/basic-install.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index ab3a2290..5b517ab9 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -86,9 +86,9 @@ adlistFile="/etc/pihole/adlists.list" IPV4_ADDRESS=${IPV4_ADDRESS} IPV6_ADDRESS=${IPV6_ADDRESS} # Give settings their default values. These may be changed by prompts later in the script. -QUERY_LOGGING=true +QUERY_LOGGING= WEBPORT=8080 -PRIVACY_LEVEL=0 +PRIVACY_LEVEL= # Where old configs go to if a v6 migration is performed V6_CONF_MIGRATION_DIR="/etc/pihole/migration_backup_v6" @@ -2300,6 +2300,15 @@ main() { pihole -a -p "${pw}" fi + # write privacy level and logging to pihole.toml + # set on fresh installations by setPrivacyLevel() and setLogging( + if [ -n "${QUERY_LOGGING}" ]; then + pihole-FTL --config dns.queryLogging "${QUERY_LOGGING}" + fi + if [ -n "${PRIVACY_LEVEL}" ]; then + pihole-FTL --config misc.privacylevel "${PRIVACY_LEVEL}" + fi + # Migrate existing install to v6.0 migrate_dnsmasq_configs