From 39f54ee16c134c4c2d716e7c2744621094f1a70b Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Sep 2025 14:29:59 -0600 Subject: [PATCH] mode/jwt.sh: fix 22.04 prosody version detection. --- mode/jwt.sh | 7 ++++--- tools/{ => jwt}/jitsi_token_maker_features.py | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename tools/{ => jwt}/jitsi_token_maker_features.py (100%) diff --git a/mode/jwt.sh b/mode/jwt.sh index e1935eb..3c6a345 100644 --- a/mode/jwt.sh +++ b/mode/jwt.sh @@ -29,11 +29,12 @@ ROOM="Two-Hour-Test-Room" SRP_STR="$(grep -n "VirtualHost \"$DOMAIN\"" "$PROSODY_FILE" | head -n1 | cut -d ":" -f1)" SRP_END="$((SRP_STR + 10))" -# Prosody 0.12 only +# Prosody 0.12{,.*} only if command -v prosodyctl >/dev/null 2>&1; then PROSODY_VER="$(prosodyctl about 2>/dev/null | sed -n 's/^Prosody //p' | awk '{print $1}')" case "$PROSODY_VER" in - 0.12.*) : ;; + 0.12) : ;; # 22.04 + 0.12.*) : ;; # 24.04 *) echo "Prosody $PROSODY_VER NO supported for JWT mode (required 0.12.x)" exit 1 ;; esac @@ -100,7 +101,7 @@ echo -e "\nAPP_ID: $APP_ID" && \ echo -e "SECRET_APP: $SECRET_APP\n" echo -e "You can test JWT authentication with the following token for the next 2 hours:\n" -python3 tools/jitsi_token_maker_features.py \ +python3 tools/jwt/jitsi_token_maker_features.py \ --app-id "$APP_ID" --secret "$SECRET_APP" \ --domain "$DOMAIN" --room "$ROOM" \ --moderator --features-all \ diff --git a/tools/jitsi_token_maker_features.py b/tools/jwt/jitsi_token_maker_features.py similarity index 100% rename from tools/jitsi_token_maker_features.py rename to tools/jwt/jitsi_token_maker_features.py