mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-20 01:35:13 +03:00
32 lines
631 B
Text
32 lines
631 B
Text
#!/sbin/openrc-run
|
|
|
|
PIDFILE=/var/run/janus.pid
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -f -o $JANUS_USER:$JANUS_GROUP -m644 /var/log/janus.log
|
|
if [ ! -f /etc/janus/janus.jcfg ] ; then
|
|
eerror "/etc/janus/janus.jcfg file doesn't exists!"
|
|
return 1
|
|
fi
|
|
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting Janus gateway server"
|
|
start-stop-daemon --start --make-pidfile --exec /usr/bin/janus \
|
|
--pidfile "${PIDFILE}" --background --quiet \
|
|
--user "${JANUS_USER}" \
|
|
-- ${JANUS_OPTS} -L /var/log/janus.log
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping Janus gateway server"
|
|
start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
|
|
eend $?
|
|
}
|
|
|