2020-04-07 16:40:16 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Wait for kibana
|
2020-06-04 14:52:01 +02:00
|
|
|
if [ ! -z "${WAIT_KIBANA_URL}" ]; then
|
2020-05-05 11:52:00 +02:00
|
|
|
printf "\n"
|
|
|
|
printf "\n ======================================="
|
|
|
|
printf "\n = WAIT KIBANA ="
|
|
|
|
printf "\n ======================================="
|
|
|
|
printf "\n"
|
|
|
|
|
2020-11-25 00:56:43 +01:00
|
|
|
until $(curl --insecure --output /dev/null --silent --head --fail --max-time 10 --connect-timeout 10 ${WAIT_KIBANA_URL})
|
2020-09-22 18:19:51 +02:00
|
|
|
do
|
2020-05-05 11:52:00 +02:00
|
|
|
printf "\n Waiting for kibana in '%s' URL..." "${WAIT_KIBANA_URL}"
|
2020-04-07 16:40:16 +02:00
|
|
|
sleep 1
|
|
|
|
done
|
2020-09-22 18:19:51 +02:00
|
|
|
printf "\n ==== Kibana is Ready ===="
|
2020-04-07 16:40:16 +02:00
|
|
|
fi
|
|
|
|
|
2020-05-05 11:52:00 +02:00
|
|
|
# Launch Openvidu Pro
|
|
|
|
printf "\n"
|
|
|
|
printf "\n ======================================="
|
2020-05-05 18:20:41 +02:00
|
|
|
printf "\n = LAUNCH OPENVIDU-SERVER ="
|
2020-05-05 11:52:00 +02:00
|
|
|
printf "\n ======================================="
|
|
|
|
printf "\n"
|
|
|
|
|
2020-11-02 19:46:59 +01:00
|
|
|
# Get coturn public ip
|
2020-11-02 20:30:36 +01:00
|
|
|
[[ -z "${COTURN_IP}" ]] && export COTURN_IP=auto-ipv4
|
2020-11-02 21:15:18 +01:00
|
|
|
if [[ "${COTURN_IP}" == "auto-ipv4" ]]; then
|
2020-11-02 19:46:59 +01:00
|
|
|
COTURN_IP=$(/usr/local/bin/discover_my_public_ip.sh)
|
2020-11-02 21:15:18 +01:00
|
|
|
elif [[ "${COTURN_IP}" == "auto-ipv6" ]]; then
|
2020-11-02 19:46:59 +01:00
|
|
|
COTURN_IP=$(/usr/local/bin/discover_my_public_ip.sh --ipv6)
|
|
|
|
fi
|
|
|
|
|
2020-11-09 19:35:25 +01:00
|
|
|
if [[ "${OV_CE_DEBUG_LEVEL}" == "DEBUG" ]]; then
|
|
|
|
export LOGGING_LEVEL_IO_OPENVIDU_SERVER=DEBUG
|
|
|
|
fi
|
|
|
|
|
2020-04-13 14:19:38 +02:00
|
|
|
if [ ! -z "${JAVA_OPTIONS}" ]; then
|
2020-05-05 11:52:00 +02:00
|
|
|
printf "\n Using java options: %s" "${JAVA_OPTIONS}"
|
2020-04-13 14:19:38 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar
|