instanceinfo.sh: Added support for ActivityRelay.

This commit is contained in:
tastytea 2019-07-23 18:56:19 +02:00
parent f341ef4de3
commit 659ea46373
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 10 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Print some basic info about fediverse instances.
# Version: 2019-07-23_1
# Version: 2019-07-23_2
if [[ -z "${1}" ]]; then
echo "usage: ${0} DOMAIN" >&2
@ -65,8 +65,17 @@ function parse_nodeinfo()
echo -n "Open registrations: "
jq -r ".openRegistrations" <<<"${json}"
if [[ "${implementation}" == "activityrelay" ]]; then
# shellcheck disable=SC2155
local peers=$(jq -r ".metadata.peers" <<<"${json}")
[[ "${peers}" != "null" ]] && echo "Peers: ${peers}"
fi
# shellcheck disable=SC2155
local restrictions=$(jq -r ".metadata.federation.mrf_simple" <<<"${json}")
if [[ "${restrictions}" == "null" ]]; then
restrictions=$(jq -r ".federation" <<<"${json}")
fi
[[ "${restrictions}" != "null" ]] && echo "Federation restrictions: ${restrictions}"
if [[ "${implementation}" == "pleroma" ]]; then