mode/jwt.sh: fix 22.04 prosody version detection. (#126)
Reviewed-on: #126 Co-authored-by: Ark74 <ark@switnet.org> Co-committed-by: Ark74 <ark@switnet.org>
This commit is contained in:
parent
8288c4b245
commit
8f983ab71b
|
@ -29,11 +29,12 @@ ROOM="Two-Hour-Test-Room"
|
||||||
SRP_STR="$(grep -n "VirtualHost \"$DOMAIN\"" "$PROSODY_FILE" | head -n1 | cut -d ":" -f1)"
|
SRP_STR="$(grep -n "VirtualHost \"$DOMAIN\"" "$PROSODY_FILE" | head -n1 | cut -d ":" -f1)"
|
||||||
SRP_END="$((SRP_STR + 10))"
|
SRP_END="$((SRP_STR + 10))"
|
||||||
|
|
||||||
# Prosody 0.12 only
|
# Prosody 0.12{,.*} only
|
||||||
if command -v prosodyctl >/dev/null 2>&1; then
|
if command -v prosodyctl >/dev/null 2>&1; then
|
||||||
PROSODY_VER="$(prosodyctl about 2>/dev/null | sed -n 's/^Prosody //p' | awk '{print $1}')"
|
PROSODY_VER="$(prosodyctl about 2>/dev/null | sed -n 's/^Prosody //p' | awk '{print $1}')"
|
||||||
case "$PROSODY_VER" in
|
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)"
|
*) echo "Prosody $PROSODY_VER NO supported for JWT mode (required 0.12.x)"
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -100,7 +101,7 @@ echo -e "\nAPP_ID: $APP_ID" && \
|
||||||
echo -e "SECRET_APP: $SECRET_APP\n"
|
echo -e "SECRET_APP: $SECRET_APP\n"
|
||||||
|
|
||||||
echo -e "You can test JWT authentication with the following token for the next 2 hours:\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" \
|
--app-id "$APP_ID" --secret "$SECRET_APP" \
|
||||||
--domain "$DOMAIN" --room "$ROOM" \
|
--domain "$DOMAIN" --room "$ROOM" \
|
||||||
--moderator --features-all \
|
--moderator --features-all \
|
||||||
|
|
Loading…
Reference in New Issue