Oh yeah, we don't need these lighttpd files any more...
This commit is contained in:
parent
45f2d2dad6
commit
a27bd400c2
|
@ -1,8 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
s6-echo "Stopping lighttpd-access-log"
|
||||
pid=$(ps -C cat -o pid=,args= |grep -oP "([0-9]+).+access\.log" |cut -f1 -d" ")
|
||||
if [[ -n ${pid} ]]; then
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
s6-echo "Stopped lighttpd-access-log"
|
|
@ -1,5 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
s6-echo "Starting lighttpd-access-log"
|
||||
|
||||
s6-setuidgid www-data cat /var/log/lighttpd/access-pihole.log 2>&1
|
|
@ -1 +0,0 @@
|
|||
longrun
|
|
@ -1,8 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
s6-echo "Stopping lighttpd-error-log"
|
||||
pid=$(ps -C cat -o pid=,args= |grep -oP "([0-9]+).+error\.log" |cut -f1 -d" ")
|
||||
if [[ -n ${pid} ]]; then
|
||||
kill -9 ${pid}
|
||||
fi
|
||||
s6-echo "Stopped lighttpd-error-log"
|
|
@ -1,5 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
s6-echo "Starting lighttpd-error-log"
|
||||
|
||||
s6-setuidgid www-data cat /var/log/lighttpd/error-pihole.log 2>&1
|
|
@ -1 +0,0 @@
|
|||
longrun
|
|
@ -1,6 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
s6-echo "Stopping lighttpd"
|
||||
service lighttpd-access-log stop
|
||||
service lighttpd-error-log stop
|
||||
killall -9 lighttpd
|
|
@ -1,34 +0,0 @@
|
|||
#!/command/with-contenv bash
|
||||
|
||||
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
|
||||
set -x ;
|
||||
fi
|
||||
|
||||
if [[ 1 -eq ${WEBLOGS_STDOUT:-0} ]]; then
|
||||
#lighthttpd cannot use /dev/stdout https://redmine.lighttpd.net/issues/2731
|
||||
for fi in /var/log/lighttpd/access-pihole.log /var/log/lighttpd/error-pihole.log
|
||||
do
|
||||
if [[ ! -p ${fi} ]]; then
|
||||
rm -f ${fi}
|
||||
mkfifo -m 600 ${fi}
|
||||
fi
|
||||
done
|
||||
chown -R www-data:www-data /var/log/lighttpd
|
||||
service lighttpd-access-log start
|
||||
service lighttpd-error-log start
|
||||
sleep 2
|
||||
else
|
||||
#remove fifo if exists
|
||||
[[ -p /var/log/lighttpd/access-pihole.log ]] && rm -Rf /var/log/lighttpd/access-pihole.log
|
||||
[[ -p /var/log/lighttpd/error-pihole.log ]] && rm -Rf /var/log/lighttpd/error-pihole.log
|
||||
|
||||
# install /dev/null log files to ensure they exist (create if non-existing, preserve if existing)
|
||||
[[ ! -f /var/log/lighttpd/access-pihole.log ]] && install /dev/null /var/log/lighttpd/access-pihole.log
|
||||
[[ ! -f /var/log/lighttpd/error-pihole.log ]] && install /dev/null /var/log/lighttpd/error-pihole.log
|
||||
|
||||
# Ensure that permissions are set so that lighttpd can write to the logs
|
||||
chown -R www-data:www-data /var/log/lighttpd
|
||||
chmod 0644 /var/log/lighttpd/access-pihole.log /var/log/lighttpd/error-pihole.log
|
||||
fi
|
||||
|
||||
lighttpd -D -f /etc/lighttpd/lighttpd.conf
|
|
@ -1 +0,0 @@
|
|||
longrun
|
Loading…
Reference in New Issue