1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-21 06:56:53 +02:00

Touch/chown lighttpd access/error logs on service start. May not be 100% neccasery currently, but could be useful

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2022-01-26 18:29:14 +00:00
parent 25539a9c99
commit 2eb9afc350
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173

View File

@ -1,4 +1,12 @@
#!/usr/bin/with-contenv bash
s6-echo "Starting lighttpd"
# Touch log files to ensure they exist (create if non-existing, preserve if existing)
touch /var/log/lighttpd/access.log /var/log/lighttpd/error.log
# Ensure that permissions are set so that lighttpd can write to the logs
chown www-data:www-data /var/log/lighttpd/access.log /var/log/lighttpd/error.log
chmod 0644 /var/log/lighttpd/access.log /var/log/lighttpd/error.log
lighttpd -D -f /etc/lighttpd/lighttpd.conf