mode/jwt.sh: fix 22.04 prosody version detection.

This commit is contained in:
Luis Guzmán 2025-09-03 14:29:59 -06:00
parent 8288c4b245
commit 39f54ee16c
2 changed files with 4 additions and 3 deletions

View File

@ -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 \