Merge pull request #991 from pi-hole/tweak/lighttpd-run
Touch/chown lighttpd access/error logs on service start
This commit is contained in:
commit
a29faad9df
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue