Created
August 26, 2019 03:42
-
-
Save mamemomonga/b2bed68bfa6e96839041ac4420f15122 to your computer and use it in GitHub Desktop.
mstdn.jp のリダイレクト状態の変化を検出してトゥートするツール
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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