add finish scripts for logs. prevent duplicate cat processes, lighttpd start loop

Signed-off-by: edgd1er <edgd1er@hotmail.com>
This commit is contained in:
edgd1er 2022-01-27 05:49:59 +01:00
parent 140312b79c
commit 06d6b74c63
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/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
echo "Killing ${pid}"
kill -9 ${pid}
fi
s6-echo "Stopped lighttpd-access-log"

View File

@ -0,0 +1,9 @@
#!/usr/bin/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
echo "Killing ${pid}"
kill -9 ${pid}
fi
s6-echo "Stopped lighttpd-error-log"

View File

@ -2,3 +2,5 @@
s6-echo "Stopping lighttpd"
killall -9 lighttpd
service lighttpd-access-log stop
service lighttpd-error-log stop