grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
50
fork

Configure Feed

Select the types of activity you want to include in your feed.

at ba7e272750c444d01409b0a48953fb8f2321169d 35 lines 805 B view raw
1#!/bin/bash 2set -o errexit 3set -o nounset 4set -o pipefail 5 6PDS_ENV_FILE=${PDS_ENV_FILE:-".env"} 7source "${PDS_ENV_FILE}" 8 9RELAY_HOSTS="${1:-}" 10if [[ "${RELAY_HOSTS}" == "" ]]; then 11 RELAY_HOSTS="${PDS_CRAWLERS}" 12fi 13 14if [[ "${RELAY_HOSTS}" == "" ]]; then 15 echo "ERROR: missing RELAY HOST parameter." >/dev/stderr 16 echo "Usage: $0 <RELAY HOST>[,<RELAY HOST>,...]" >/dev/stderr 17 exit 1 18fi 19 20for host in ${RELAY_HOSTS//,/ }; do 21 echo "Requesting crawl from ${host}" 22 if [[ $host != https:* && $host != http:* ]]; then 23 host="https://${host}" 24 fi 25 curl \ 26 --fail \ 27 --silent \ 28 --show-error \ 29 --request POST \ 30 --header "Content-Type: application/json" \ 31 --data "{\"hostname\": \"${PDS_HOSTNAME}\"}" \ 32 "${host}/xrpc/com.atproto.sync.requestCrawl" >/dev/null 33done 34 35echo "done"