nostril

A C cli tool for creating nostr events
git clone git://jb55.com/nostril
Log | Files | Refs | Submodules | README | LICENSE

nostril-relay (523B)


      1 #!/usr/bin/env bash
      2 
      3 relays=${NOSTR_RELAYS:-$(git config nostr.relays)}
      4 relayer=${NOSTR_RELAYER:-nostcat}
      5 to_stdout=0
      6 
      7 if ! command -v $relayer; then
      8 	printf "nostr relayer '%s' not found. Please install or set NOSTR_RELAYER to your preferred relayer.\n" "$relayer"
      9 	exit 1
     10 fi
     11 
     12 if [ "$relays" == "" ]; then
     13 	printf 'no relays set. set\n\n    export NOSTR_RELAYS="wss://relay1.com wss://relay2.com ..." or\n\n    git config --global --add nostr.relays "wss://relay1.com wss://relay2.com"\n' >&2
     14 	exit 1
     15 fi
     16 
     17 $relayer $relays