Fixed path to 404 file when using custom.php (#4488)

Signed-off-by: Computroniks <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson 2021-12-28 18:32:06 +00:00 committed by GitHub
parent 3d3bb45a46
commit 71ed842dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1334,7 +1334,7 @@ installConfigs() {
chmod 644 /etc/lighttpd/external.conf chmod 644 /etc/lighttpd/external.conf
# If there is a custom block page in the html/pihole directory, replace 404 handler in lighttpd config # If there is a custom block page in the html/pihole directory, replace 404 handler in lighttpd config
if [[ -f "${PI_HOLE_BLOCKPAGE_DIR}/custom.php" ]]; then if [[ -f "${PI_HOLE_BLOCKPAGE_DIR}/custom.php" ]]; then
sed -i 's/^\(server\.error-handler-404\s*=\s*\).*$/\1"pihole\/custom\.php"/' "${lighttpdConfig}" sed -i 's/^\(server\.error-handler-404\s*=\s*\).*$/\1"\/pihole\/custom\.php"/' "${lighttpdConfig}"
fi fi
# Make the directories if they do not exist and set the owners # Make the directories if they do not exist and set the owners
mkdir -p /run/lighttpd mkdir -p /run/lighttpd