1
1
#!/usr/bin/with-contenv bash
2
2
3
- if [[ -z $JVB_AUTH_PASSWORD ]]; then
4
- echo 'FATAL ERROR: JVB auth password must be set'
5
- exit 1
6
- fi
3
+ if [[ -z $JVB_DISABLE_XMPP ]]; then
4
+ if [[ -z $JVB_AUTH_PASSWORD ]]; then
5
+ echo 'FATAL ERROR: JVB auth password must be set'
6
+ exit 1
7
+ fi
7
8
8
- OLD_JVB_AUTH_PASSWORD=passw0rd
9
- if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
10
- echo 'FATAL ERROR: JVB auth password must be changed, check the README'
11
- exit 1
12
- fi
9
+ OLD_JVB_AUTH_PASSWORD=passw0rd
10
+ if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
11
+ echo 'FATAL ERROR: JVB auth password must be changed, check the README'
12
+ exit 1
13
+ fi
13
14
14
- [ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi
15
+ [ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi
16
+
17
+ # On environments like Swarm the IP address used by the default gateway need not be
18
+ # the one used for inter-container traffic. Use that one for our fallback ID.
19
+ XMPP_SERVER_IP=$(dig +short +search ${XMPP_SERVER})
20
+ export JVB_WS_SERVER_ID_FALLBACK=$(ip route get ${XMPP_SERVER_IP} | grep -oP '(?<=src ).*' | awk '{ print $1 '})
21
+ fi
15
22
16
23
# Migration from DOCKER_HOST_ADDRESS to JVB_ADVERTISE_IPS
17
24
if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
@@ -21,11 +28,6 @@ if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
21
28
fi
22
29
fi
23
30
24
- # On environments like Swarm the IP address used by the default gateway need not be
25
- # the one used for inter-container traffic. Use that one for our fallback ID.
26
- XMPP_SERVER_IP=$(dig +short +search ${XMPP_SERVER})
27
- export JVB_WS_SERVER_ID_FALLBACK=$(ip route get ${XMPP_SERVER_IP} | grep -oP '(?<=src ).*' | awk '{ print $1 '})
28
-
29
31
# Local IP for the ice4j mapping harvester.
30
32
export LOCAL_ADDRESS=$(ip route get 1 | grep -oP '(?<=src ).*' | awk '{ print $1 '})
31
33
0 commit comments