add finish scripts for logs. prevent duplicate cat processes, lighttpd start loop
Signed-off-by: edgd1er <edgd1er@hotmail.com>
This commit is contained in:
parent
140312b79c
commit
06d6b74c63
|
@ -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"
|
|
@ -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"
|
|
@ -2,3 +2,5 @@
|
|||
|
||||
s6-echo "Stopping lighttpd"
|
||||
killall -9 lighttpd
|
||||
service lighttpd-access-log stop
|
||||
service lighttpd-error-log stop
|
||||
|
|
Loading…
Reference in New Issue