-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint_openvidu.sh
30 lines (23 loc) · 1.02 KB
/
entrypoint_openvidu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
printf "\n"
printf "\n ======================================="
printf "\n = LAUNCH OPENVIDU-SERVER ="
printf "\n ======================================="
printf "\n"
[[ -z "${SUPPORT_DEPRECATED_API}" ]] && export SUPPORT_DEPRECATED_API=false
[[ -z "${DOMAIN_OR_PUBLIC_IP}" ]] && export DOMAIN_OR_PUBLIC_IP=auto-ipv4
[[ "${DOMAIN_OR_PUBLIC_IP}" == "auto-ipv4" ]] && export DOMAIN_OR_PUBLIC_IP=$(/usr/local/bin/discover_my_public_ip.sh)
# Get coturn public ip
[[ -z "${TURN_PUBLIC_IP}" ]] && export TURN_PUBLIC_IP=auto-ipv4
if [[ "${TURN_PUBLIC_IP}" == "auto-ipv4" ]]; then
TURN_PUBLIC_IP=$(/usr/local/bin/discover_my_public_ip.sh)
elif [[ "${TURN_PUBLIC_IP}" == "auto-ipv6" ]]; then
TURN_PUBLIC_IP=$(/usr/local/bin/discover_my_public_ip.sh --ipv6)
fi
if [[ "${OV_CE_DEBUG_LEVEL}" == "DEBUG" ]]; then
export LOGGING_LEVEL_IO_OPENVIDU_SERVER=DEBUG
fi
if [ ! -z "${JAVA_OPTIONS}" ]; then
printf "\n Using java options: %s" "${JAVA_OPTIONS}"
fi
exec java ${JAVA_OPTIONS:-} -jar openvidu-server.jar