Skip to content

Instantly share code, notes, and snippets.

@mamemomonga
Created August 26, 2019 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamemomonga/b2bed68bfa6e96839041ac4420f15122 to your computer and use it in GitHub Desktop.
Save mamemomonga/b2bed68bfa6e96839041ac4420f15122 to your computer and use it in GitHub Desktop.
mstdn.jp のリダイレクト状態の変化を検出してトゥートするツール
#!/bin/bash
set -eu
# go get -v github.com/mamemomonga/notebook-go/api/mastodon/easydon
easydon -t "[JP監視君] 起動しました。メンテが終了されると推測されると報告されます。"
while true; do
if [ -z "$( curl --verbose https://mstdn.jp/ 2>&1 | grep 'location: https://mastodon.cloud/@dsno' )" ]; then
easydon -t "[JP監視君] https://mstdn.jp/ のステータスが変わりました"
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment