Assorted shell and Python scripts
at main 993 B view raw
1#!/usr/bin/env bash 2 3set -euo pipefail 4 5domains=( 6 "hyperreal.coffee" 7 "annas-archive.hyperreal.coffee" 8 "anonoverflow.hyperreal.coffee" 9 "bash-hackers.hyperreal.coffee" 10 "bookmarks.hyperreal.coffee" 11 "breezewiki.hyperreal.coffee" 12 "dumb.hyperreal.coffee" 13 "feels.hyperreal.coffee" 14 "files.hyperreal.coffee" 15 "gitlab.hyperreal.coffee" 16 "jargonfile.hyperreal.coffee" 17 "lingva.hyperreal.coffee" 18 "opengist.hyperreal.coffee" 19 "pb.hyperreal.coffee" 20 "searxng.hyperreal.coffee" 21 "techne.hyperreal.coffee" 22 "txtdot.hyperreal.coffee" 23 "zsh-guide.hyperreal.coffee" 24 "zsh-manual.hyperreal.coffee" 25) 26 27for domain in "${domains[@]}"; do 28 HTTP_STATUS=$(curl -o /dev/null -s -w "%{http_code}\n" "https://${domain}") 29 if [ "$HTTP_STATUS" -ge 400 ]; then 30 curl \ 31 -H prio:urgent \ 32 -H tags:warning \ 33 -d "HTTP Status for $domain: $HTTP_STATUS" \ 34 "http://localhost:8080/http_status" 35 fi 36done