instanceinfo.sh: Added “Mastodon fork”-detection.
This commit is contained in:
parent
4a56152c56
commit
5bac006152
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Print some basic info about fediverse instances.
|
||||
|
||||
# Version: 2019-06-30_1
|
||||
# Version: 2019-06-30_2
|
||||
|
||||
if [[ -z "${1}" ]]; then
|
||||
echo "usage: ${0} DOMAIN" >&2
|
||||
|
@ -105,6 +105,8 @@ function main()
|
|||
implementation="Florence"
|
||||
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9]+"' <<<"${json}"; then
|
||||
implementation="Mastodon"
|
||||
elif grep -Eq '"version":"[0-9]+\.[0-9]+\.[0-9a-zA-Z]+"' <<<"${json}"; then
|
||||
implementation="Mastodon fork"
|
||||
fi
|
||||
if [[ -n "${implementation}" ]]; then
|
||||
# shellcheck disable=SC2155
|
||||
|
@ -128,6 +130,7 @@ function main()
|
|||
jq -r ".stats.user_count" <<<"${json}"
|
||||
|
||||
if [[ "${implementation}" == "Mastodon"
|
||||
|| "${implementation}" == "Mastodon fork"
|
||||
|| "${implementation}" == "Florence"
|
||||
|| "${implementation}" == "Gab" ]]; then
|
||||
echo "Further info, maybe: https://${instance}/about/more"
|
||||
|
|
Loading…
Reference in New Issue