instanceinfo.sh: Add support for Bookwyrm.

This commit is contained in:
tastytea 2021-02-22 00:02:37 +01:00
parent afce4cdea3
commit a9a076c06c
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Print some basic info about fediverse instances.
# Version: 2020-06-08_1
# Version: 2021-02-22_1
if [[ -z "${1}" ]]; then
echo "usage: ${0} DOMAIN" >&2
@ -188,7 +188,9 @@ function main()
if ${mycurl} -ILf -X POST "${misskeyinfo}" | grep -iq 'Content-Type: application/json'; then
echo "Misskey API found."
parse_misskey "${instance}" "${misskeyinfo}"
elif ${mycurl} -ILf "${nodeinfo}" | grep -iq 'Content-Type: application/json'; then
elif ${mycurl} -ILf "${nodeinfo}" | grep -iq 'Content-Type: application/json' \
|| ${mycurl} -s "${nodeinfo}" | jq -e '.software' > /dev/null; then
# ↑ Bookwyrm doesn't answer to HEAD requests ↑.
echo "Nodeinfo found."
parse_nodeinfo "${instance}" "${nodeinfo}"
elif ${mycurl} -ILf "${mastoinfo}" | grep -iq 'Content-Type: application/json'; then