From 1aebb6021e30990a5b3d79d91409a79cb2a0ec27 Mon Sep 17 00:00:00 2001 From: Devin Ivy Date: Thu, 22 Feb 2024 14:56:01 -0500 Subject: [PATCH] pdsadmin: correct for scheme in request crawl --- pdsadmin/request-crawl.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdsadmin/request-crawl.sh b/pdsadmin/request-crawl.sh index 29c0b05..125c05a 100644 --- a/pdsadmin/request-crawl.sh +++ b/pdsadmin/request-crawl.sh @@ -19,6 +19,9 @@ fi for host in ${RELAY_HOSTS//,/ }; do echo "Requesting crawl from ${host}" + if [[ $host != https:* && $host != http:* ]]; then + host="https://${host}" + fi curl \ --fail \ --silent \ @@ -26,7 +29,7 @@ for host in ${RELAY_HOSTS//,/ }; do --request POST \ --header "Content-Type: application/json" \ --data "{\"hostname\": \"${PDS_HOSTNAME}\"}" \ - "https://${host}/xrpc/com.atproto.sync.requestCrawl" >/dev/null + "${host}/xrpc/com.atproto.sync.requestCrawl" >/dev/null done echo "done"