From b9ebb0524679e6ad1d318023c9f63ee5de8410f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 28 Dec 2022 13:42:57 +0100 Subject: [PATCH] Set permission after we know the user wants to install the web server 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index a81ccf0e..fcfb2405 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1399,10 +1399,10 @@ installConfigs() { install -T -m 0755 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL-poststop.sh" "${PI_HOLE_INSTALL_DIR}/pihole-FTL-poststop.sh" # If the user chose to install the dashboard, + if [[ "${INSTALL_WEB_SERVER}" == true ]]; then # set permissions on /etc/lighttpd/lighttpd.conf so pihole user (other) can read the file chmod o+x /etc/lighttpd chmod o+r "${lighttpdConfig}" - if [[ "${INSTALL_WEB_SERVER}" == true ]]; then if grep -q -F "FILE AUTOMATICALLY 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}"