#!/bin/sh set -e pid=/run/matterbridge.pid log=/tmp/matterbridge.log cnf=/etc/matterbridge/matterbridge.toml srv=/srv/matterbridge case $1 in start) daemonize -a -e ${log} -o ${log} -p ${pid} -l ${pid} -u matterbridge -c ${srv} /usr/bin/matterbridge -conf ${cnf} ;; stop) test -f ${pid} || exit 0 cat ${pid} | xargs -r kill rm -f ${pid} ;; esac