diff --git a/advanced/Templates/pihole-FTL.service b/advanced/Templates/pihole-FTL.service index 04fae69a..14205fe7 100644 --- a/advanced/Templates/pihole-FTL.service +++ b/advanced/Templates/pihole-FTL.service @@ -26,6 +26,7 @@ start() { if is_running; then echo "pihole-FTL is already running" else + # Touch files to ensure they exist (create if non-existing, preserve if existing) touch /var/log/pihole-FTL.log /var/log/pihole.log touch /run/pihole-FTL.pid /run/pihole-FTL.port touch /etc/pihole/dhcp.leases @@ -33,6 +34,7 @@ start() { mkdir -p /var/log/pihole chown pihole:pihole /var/run/pihole /var/log/pihole rm /var/run/pihole/FTL.sock 2> /dev/null + # Ensure that permissions are set so that pihole-FTL can edit all necessary files chown pihole:pihole /run/pihole-FTL.pid /run/pihole-FTL.port chown pihole:pihole /etc/pihole /etc/pihole/dhcp.leases chown pihole:pihole /var/log/pihole-FTL.log /var/log/pihole.log