From 57af0ba0a49044968fd472025cd50ae3b3f3f0fa Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 29 Jul 2018 18:26:00 -0400 Subject: [PATCH] Use `install` to make the regex file Signed-off-by: Mcat12 --- automated install/basic-install.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 9d04bd85..6ea66554 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1238,10 +1238,9 @@ installConfigs() { # Install an empty regex file if [[ ! -f "${regexFile}" ]]; then - touch "${regexFile}" + # Let PHP edit the regex file, if installed + install -o pihole -g "${LIGHTTPD_GROUP:-pihole}" -m 644 /dev/null "${regexFile}" fi - chown pihole:pihole "${regexFile}" - chmod 664 "${regexFile}" # If the user chose to install the dashboard, if [[ "${INSTALL_WEB_SERVER}" == true ]]; then @@ -1269,9 +1268,6 @@ installConfigs() { chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress mkdir -p /var/cache/lighttpd/uploads chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads - - # Let PHP edit the regex file - chown pihole:${LIGHTTPD_GROUP} "${regexFile}" fi }