Last active
November 9, 2018 06:21
-
-
Save lindwurm/0f61dff1d58c19b1f7a253553b64d1b5 to your computer and use it in GitHub Desktop.
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 | |
# example | |
instance = "mstdn.maud.io" | |
cd ~/live | |
echo "へいますたー!" | toot | |
git pull | |
# ここはverup時だけ | |
# bundle install --deployment --without development test | |
# yarn install --pure-lockfile | |
# RAILS_ENV=production bundle exec rails db:migrate | |
echo "ぷりこんぱいる?" | toot | |
RAILS_ENV=production bundle exec rails assets:precompile | |
echo "でっぷろーい!" | toot | |
sleep 5s | |
# non-docker | |
sudo systemctl restart mastodon-* | |
while true; do | |
DonAlive=$(curl -s -o /dev/null -I -w "%{http_code}\n" https://${instance}/) | |
if [ $DonAlive -eq 302 ]; then | |
break | |
fi | |
echo "しっぱい… 5s後に再試行するよ" | |
sleep 5s | |
done | |
echo "だん!" | toot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
require
howto