Ensure existing files are proper owner and mode.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net> co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -1129,7 +1129,8 @@ chooseBlocklists() {
|
||||
done
|
||||
# Create an empty adList file with appropriate permissions.
|
||||
if [ ! -f "${adlistFile}" ]; then
|
||||
install /dev/null "${adlistFile}"
|
||||
install -m 644 /dev/null "${adlistFile}"
|
||||
else
|
||||
chmod 644 "${adlistFile}"
|
||||
fi
|
||||
}
|
||||
@@ -1333,7 +1334,7 @@ installConfigs() {
|
||||
install -D -m 644 -T ${PI_HOLE_LOCAL_REPO}/advanced/${LIGHTTPD_CFG} "${lighttpdConfig}"
|
||||
# Make sure the external.conf file exists, as lighttpd v1.4.50 crashes without it
|
||||
if [ ! -f /etc/lighttpd/external.conf ]; then
|
||||
install -m 644 /dev/null /etc/lighttpd/external.com
|
||||
install -m 644 /dev/null /etc/lighttpd/external.conf
|
||||
fi
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user