#!/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"