containers-mmmonit/mmmonitd.sh

19 lines
331 B
Bash
Raw Normal View History

2022-03-14 21:14:24 +00:00
#!/bin/sh
set -e
dir=${DIR:-/srv}
pid=/run/mmmonit.pid
usr=${USER:-nobody}
case $1 in
start)
chown -R ${usr}:${usr} ${dir}
2022-07-04 01:36:28 +00:00
daemonize -c ${dir} -p ${pid} -l ${pid} -u ${usr} /usr/local/bin/syslogize /usr/bin/mmmonit -b :: -p 3000
2022-03-14 21:14:24 +00:00
;;
stop)
test -f ${pid} || exit 0
cat ${pid} | xargs -r kill
;;
esac