mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Fix lighttpd v1.4.50 crashing on startup
It has a bug/regression causing it to fail if external.conf does not exist, so touch external.conf when installing lighttpd config Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com>
This commit is contained in:
parent
ec29829550
commit
3cea1bd423
@ -1290,6 +1290,8 @@ installConfigs() {
|
|||||||
fi
|
fi
|
||||||
# and copy in the config file Pi-hole needs
|
# and copy in the config file Pi-hole needs
|
||||||
cp ${PI_HOLE_LOCAL_REPO}/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
||||||
|
# Make sure the external.conf file exists, as lighttpd v1.4.50 crashes without it
|
||||||
|
touch /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 "/var/www/html/pihole/custom.php" ]]; then
|
if [[ -f "/var/www/html/pihole/custom.php" ]]; then
|
||||||
sed -i 's/^\(server\.error-handler-404\s*=\s*\).*$/\1"pihole\/custom\.php"/' /etc/lighttpd/lighttpd.conf
|
sed -i 's/^\(server\.error-handler-404\s*=\s*\).*$/\1"pihole\/custom\.php"/' /etc/lighttpd/lighttpd.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user