log to syslog

This commit is contained in:
f 2022-07-03 22:36:28 -03:00
parent 5416ab7cba
commit 3fa2ef3b5d
1 changed files with 1 additions and 3 deletions

View File

@ -3,14 +3,12 @@ set -e
dir=${DIR:-/srv}
pid=/run/mmmonit.pid
# TODO: Log to syslog
log=${dir}/mmmonit.log
usr=${USER:-nobody}
case $1 in
start)
chown -R ${usr}:${usr} ${dir}
daemonize -a -e ${log} -o ${log} -c ${dir} -p ${pid} -l ${pid} -u ${usr} /usr/bin/mmmonit -b :: -p 3000
daemonize -c ${dir} -p ${pid} -l ${pid} -u ${usr} /usr/local/bin/syslogize /usr/bin/mmmonit -b :: -p 3000
;;
stop)
test -f ${pid} || exit 0