This commit is contained in:
parent
b09bdf181a
commit
2c2b9d7b70
2 changed files with 5 additions and 1 deletions
|
@ -3,7 +3,10 @@ ARG BASE_IMAGE=sutty/monit
|
||||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||||
MAINTAINER "f <f@sutty.nl>"
|
MAINTAINER "f <f@sutty.nl>"
|
||||||
|
|
||||||
|
RUN getent group 82 || addgroup -g 82 -S www-data
|
||||||
|
RUN adduser -s /bin/sh -G www-data -h /srv/matterbridge -D matterbridge
|
||||||
RUN apk add --no-cache matterbridge daemonize
|
RUN apk add --no-cache matterbridge daemonize
|
||||||
|
|
||||||
COPY ./monit.conf /etc/monit.d/matterbridge.conf
|
COPY ./monit.conf /etc/monit.d/matterbridge.conf
|
||||||
COPY ./matterbridged.sh /usr/local/bin/matterbridged
|
COPY ./matterbridged.sh /usr/local/bin/matterbridged
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@ set -e
|
||||||
pid=/run/matterbridge.pid
|
pid=/run/matterbridge.pid
|
||||||
log=/tmp/matterbridge.log
|
log=/tmp/matterbridge.log
|
||||||
cnf=/etc/matterbridge/matterbridge.toml
|
cnf=/etc/matterbridge/matterbridge.toml
|
||||||
|
srv=/srv/matterbridge
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
daemonize -a -e ${log} -o ${log} -p ${pid} -l ${pid} /usr/bin/matterbridge -conf ${cnf}
|
daemonize -a -e ${log} -o ${log} -p ${pid} -l ${pid} -u matterbridge -c ${srv} /usr/bin/matterbridge -conf ${cnf}
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
test -f ${pid} || exit 0
|
test -f ${pid} || exit 0
|
||||||
|
|
Loading…
Reference in a new issue