aboutsummaryrefslogtreecommitdiff
path: root/app/jitsi/build/jitsi-videobridge/jvb_run
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-08-23 18:00:07 +0200
committerAlex Auvolat <alex@adnab.me>2022-08-23 18:00:07 +0200
commit5994e41ad1fdba931ae488d8e0efb13f3e505c18 (patch)
tree342f432cc0a4598570672f7f8d66d7fa400aa693 /app/jitsi/build/jitsi-videobridge/jvb_run
parent02b1e6200c6f2acf85e4471ea341adde8e93ec9c (diff)
downloadnixcfg-5994e41ad1fdba931ae488d8e0efb13f3e505c18.tar.gz
nixcfg-5994e41ad1fdba931ae488d8e0efb13f3e505c18.zip
Add jitsi
Diffstat (limited to 'app/jitsi/build/jitsi-videobridge/jvb_run')
-rwxr-xr-xapp/jitsi/build/jitsi-videobridge/jvb_run22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/jitsi/build/jitsi-videobridge/jvb_run b/app/jitsi/build/jitsi-videobridge/jvb_run
new file mode 100755
index 0000000..8d595e6
--- /dev/null
+++ b/app/jitsi/build/jitsi-videobridge/jvb_run
@@ -0,0 +1,22 @@
+#!/bin/bash
+update-ca-certificates -f
+
+if [ -z "${JITSI_NAT_LOCAL_IP}" ]; then
+ JITSI_NAT_LOCAL_IP=$(ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+')
+fi
+
+if [ -z "${JITSI_NAT_PUBLIC_IP}" ]; then
+ JITSI_NAT_PUBLIC_IP=$(curl https://ifconfig.me)
+fi
+
+echo "NAT config: ${JITSI_NAT_LOCAL_IP} -> ${JITSI_NAT_PUBLIC_IP}"
+
+exec java \
+ -Dlog4j2.formatMsgNoLookups=true \
+ -Djdk.tls.ephemeralDHKeySize=2048 \
+ -Djava.util.logging.config.file=/usr/share/jvb/lib/logging.properties \
+ -Dconfig.file=/etc/jitsi/videobridge.conf \
+ -Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP} \
+ -Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP} \
+ -cp '/usr/share/jvb/jitsi-videobridge.jar:/usr/share/jvb/lib/*' \
+ org.jitsi.videobridge.MainKt