mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-21 21:53:43 +00:00
Fix setting query logging and privacy level (#5724)
This commit is contained in:
commit
7206569b1d
1 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue