From 79087fb252c1f88fae1d1b9eaeabea7830006672 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 1 Jan 2025 18:55:49 +0100 Subject: [PATCH 1/2] SHow lighttpd disable dialog only once during v6 migration and when lighttpd is actually installed Signed-off-by: DL6ER --- automated install/basic-install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b1608c70..88369165 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2301,6 +2301,11 @@ copy_to_install_log() { } disableLighttpd() { + # Return early when lighttpd is not installed + if [[ ! -f /etc/lighttpd/lighttpd.conf ]]; then + return + fi + local response # Detect if the terminal is interactive if [[ -t 0 ]]; then @@ -2345,6 +2350,9 @@ migrate_dnsmasq_configs() { return 0 fi + # Disable lighttpd server during v6 migration + disableLighttpd + # Create target directory /etc/pihole/migration_backup_v6 # and make it owned by pihole:pihole mkdir -p "${V6_CONF_MIGRATION_DIR}" @@ -2536,9 +2544,6 @@ main() { # but before starting or resttarting the ftl service disable_resolved_stublistener - # Disable lighttpd server - disableLighttpd - # Check if gravity database needs to be upgraded. If so, do it without rebuilding # gravity altogether. This may be a very long running task needlessly blocking # the update process. From 364281354c75eceb1d1eec88687cf0bd7debca64 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 2 Jan 2025 13:43:32 +0100 Subject: [PATCH 2/2] Check if service is currently enabled when checking if lighttpd may need to be disabled Signed-off-by: DL6ER --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 88369165..ea8e210e 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2301,8 +2301,8 @@ copy_to_install_log() { } disableLighttpd() { - # Return early when lighttpd is not installed - if [[ ! -f /etc/lighttpd/lighttpd.conf ]]; then + # Return early when lighttpd is not active + if ! check_service_active lighttpd; then return fi