only chown/chmod pihole-FTL.db if it exists
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
6b29503dd0
commit
2567ab9940
|
@ -26,8 +26,12 @@ prepare_configs() {
|
|||
# Re-apply perms from basic-install over any volume mounts that may be present (or not)
|
||||
# Also similar to preflights for FTL https://github.com/pi-hole/pi-hole/blob/master/advanced/Templates/pihole-FTL.service
|
||||
chown pihole:root /etc/lighttpd
|
||||
chown pihole:pihole "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" "${PI_HOLE_CONFIG_DIR}/pihole-FTL.db" "/var/log/pihole"
|
||||
chown pihole:pihole "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" "/var/log/pihole"
|
||||
chmod 644 "${PI_HOLE_CONFIG_DIR}/pihole-FTL.conf" "${PI_HOLE_CONFIG_DIR}/pihole-FTL.db"
|
||||
if [[ -e "${PI_HOLE_CONFIG_DIR}/pihole-FTL.db" ]]; then
|
||||
chown pihole:pihole "${PI_HOLE_CONFIG_DIR}/pihole-FTL.db"
|
||||
chmod 644 "${PI_HOLE_CONFIG_DIR}/pihole-FTL.db"
|
||||
fi
|
||||
touch /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
|
||||
chown pihole:pihole /var/run/pihole /var/log/pihole
|
||||
test -f /var/run/pihole/FTL.sock && rm /var/run/pihole/FTL.sock
|
||||
|
|
Loading…
Reference in New Issue