From 3ad896595953b98647e6e01587fd06c5c9d88f5e Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 1 Feb 2023 17:38:21 +0000 Subject: [PATCH] Tweak old pihole lighttpd config warning message to better reflect the consequences of making changes to the file Signed-off-by: Adam Warner --- advanced/lighttpd.conf.debian | 16 +++++++++------- advanced/lighttpd.conf.fedora | 16 +++++++++------- automated install/basic-install.sh | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index 5a96c6cd..f31f7bcd 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -7,13 +7,15 @@ # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. -############################################################################### -# FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE. # -# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE # -# # -# CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE: # -# /etc/lighttpd/external.conf # -############################################################################### +################################################################################################### +# IF THIS HEADER EXISTS, THE FILE WILL BE OVERWRITTEN BY PI-HOLE'S UPDATE PROCEDURE. # +# ANY CHANGES MADE TO THIS FILE WILL BE LOST ON THE NEXT UPDATE UNLESS YOU REMOVE THIS HEADER # +# # +# ENSURE THAT YOU DO NOT REMOVE THE REQUIRED LINE: # +# # +# include "/etc/lighttpd/conf-enabled/*.conf" # +# # +################################################################################################### server.modules = ( "mod_access", diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 6276bfcb..e09d7760 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -7,13 +7,15 @@ # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. -############################################################################### -# FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE. # -# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE # -# # -# CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE: # -# /etc/lighttpd/external.conf # -############################################################################### +################################################################################################### +# IF THIS HEADER EXISTS, THE FILE WILL BE OVERWRITTEN BY PI-HOLE'S UPDATE PROCEDURE. # +# ANY CHANGES MADE TO THIS FILE WILL BE LOST ON THE NEXT UPDATE UNLESS YOU REMOVE THIS HEADER # +# # +# ENSURE THAT YOU DO NOT REMOVE THE REQUIRED LINE: # +# # +# include "/etc/lighttpd/conf.d/pihole-admin.conf" # +# # +################################################################################################### server.modules = ( "mod_access", diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 6bb8e363..05bc0e4e 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1409,7 +1409,7 @@ installConfigs() { mkdir -p /run/lighttpd chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /run/lighttpd - if grep -q -F "FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE" "${lighttpdConfig}"; then + if grep -q -F "FILE WILL BE OVERWRITTEN BY PI-HOLE" "${lighttpdConfig}"; then # Attempt to preserve backwards compatibility with older versions install -D -m 644 -T ${PI_HOLE_LOCAL_REPO}/advanced/${LIGHTTPD_CFG} "${lighttpdConfig}" # Make the directories if they do not exist and set the owners