unitas-jitsi/net-misc/jitsi-videobridge-bin/files/jitsi-videobridge-init.d

35 lines
1.1 KiB
D
Raw Normal View History

#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
TMPPATH=/var/run/jitsi-videobridge
if [ ! -d "$TMPPATH" ]; then
mkdir "$TMPPATH"
chown jvb:root "$TMPPATH"
fi
# Include jicofo defaults if available
if [ -f /etc/jitsi/videobridge/config ]; then
. /etc/jitsi/videobridge/config
fi
# Assign default host if not configured
if [ ! $JVB_HOST ]; then
JVB_HOST=localhost
fi
command="/usr/share/jitsi-videobridge/jvb.sh"
command_args=" --host=$JVB_HOST --domain=$JVB_HOSTNAME --port=$JVB_PORT --secret=$JVB_SECRET $JVB_OPTS"
start_stop_daemon_args="--chdir /usr/share/jicofo --user jvb:jitsi"
start_stop_daemon_args="${start_stop_daemon_args} --stdout /var/log/jitsi/jvb.log"
start_stop_daemon_args="${start_stop_daemon_args} --stderr /var/log/jitsi/jvb.log"
start_stop_daemon_args="${start_stop_daemon_args} --env JAVA_SYS_PROPS=\"$JAVA_SYS_PROPS\""
required_dirs="/var/log/jitsi"
pidfile="/var/run/jitsi-videobridge.pid"
command_background="true"
depend() {
use net logger
}