instanceinfo.sh: Added support for ActivityRelay.
This commit is contained in:
parent
f341ef4de3
commit
659ea46373
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user