From 3956ca49b66eb12208d9a31e2dc1673285186ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 18 Oct 2024 20:19:02 +0200 Subject: [PATCH] Don't attempt writing to pihole.toml if file does not exit. FTL needs to be started first 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 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 4852929c..ec09b8ed 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2367,15 +2367,6 @@ 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 @@ -2401,6 +2392,16 @@ main() { restart_service pihole-FTL + # write privacy level and logging to pihole.toml + # needs to be done after FTL service has been started, otherwise pihole.toml does not exist + # 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 + # Download and compile the aggregated block list runGravity