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

Merged
Ark74 merged 1 commits from Ark74/quick-jibri-installer:fix_2204_jwt into master 2025-09-03 20:31:41 +00:00
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 \