jitsi: Put gen-passwords.sh into the repository instead of extracting stable-7882.tar.gz

This enables us to modify gen-passwords.sh to suit Federated specific
needs, such as using a shared JVB password for Jitsi Scale.
This commit is contained in:
Bernhard "bero" Rosenkränzer (Boggins) 2024-10-29 22:08:55 +01:00
parent cbf480d7cd
commit 4043de050c
4 changed files with 28 additions and 7 deletions

View File

@ -1,6 +1,9 @@
The files here are unmodified copies of the tarballs at The original version of the `gen-passwords.sh` script is
https://github.com/jitsi/docker-jitsi-meet/tags part of docker-jitsi-meet:
https://github.com/jitsi/docker-jitsi-meet/blob/master/gen-passwords.sh
The only purpose is extracting `gen-passwords.sh`, so The version here is taken from tag `stable-9779`, last
it is ok for the file to be out of sync with the modification in commit ID `084266cec54854373d039d20eff13318b2903580`.
container being used as long as that file remains unchanged.
Local modifications:
* none; importing the original version unchanged so we can track all of our changes in git.

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
function generatePassword() {
openssl rand -hex 16
}
JICOFO_AUTH_PASSWORD=$(generatePassword)
JVB_AUTH_PASSWORD=$(generatePassword)
JIGASI_XMPP_PASSWORD=$(generatePassword)
JIBRI_RECORDER_PASSWORD=$(generatePassword)
JIBRI_XMPP_PASSWORD=$(generatePassword)
sed -i.bak \
-e "s#JICOFO_AUTH_PASSWORD=.*#JICOFO_AUTH_PASSWORD=${JICOFO_AUTH_PASSWORD}#g" \
-e "s#JVB_AUTH_PASSWORD=.*#JVB_AUTH_PASSWORD=${JVB_AUTH_PASSWORD}#g" \
-e "s#JIGASI_XMPP_PASSWORD=.*#JIGASI_XMPP_PASSWORD=${JIGASI_XMPP_PASSWORD}#g" \
-e "s#JIBRI_RECORDER_PASSWORD=.*#JIBRI_RECORDER_PASSWORD=${JIBRI_RECORDER_PASSWORD}#g" \
-e "s#JIBRI_XMPP_PASSWORD=.*#JIBRI_XMPP_PASSWORD=${JIBRI_XMPP_PASSWORD}#g" \
"$(dirname "$0")/.env"

Binary file not shown.

View File

@ -18,8 +18,7 @@ config_jitsi() {
fi fi
# Extract Jitsi's gen-password.sh into /federated/apps/jitsi # Extract Jitsi's gen-password.sh into /federated/apps/jitsi
tar zxvf /federated/lib/files/jitsi/stable-* --strip-components 1 --wildcards -C /federated/apps/jitsi '*/gen-passwords.sh' &> /dev/null install -c -m 755 /federated/lib/files/jitsi/gen-passwords.sh /federated/apps/jitsi/
[ $? -ne 0 ] && fail "Couldn't extract files/jitsi/stable* into /federated/apps/jitsi"
# Create docker compose file # Create docker compose file
cat > /federated/apps/jitsi/docker-compose.yml <<EOF cat > /federated/apps/jitsi/docker-compose.yml <<EOF