Created
March 12, 2018 15:33
-
-
Save outloudvi/cb5ad8c9cb06853e851444284d927cd8 to your computer and use it in GitHub Desktop.
Mastodon hosts fix
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 | |
# mastohosts.sh, released to Public Domain | |
## 'sudo bash mastohosts.sh >> /etc/hosts' or something else | |
## and flush your DNS cache. | |
DNS=8.8.8.8 # Select your DNS, | |
HOSTS=( | |
"cmx.im" | |
"media.cmx.im" | |
"mastodon.social" | |
"files.mastodon.social" | |
"mastodon.host" | |
"toots.social" | |
) | |
for i in ${HOSTS[*]} | |
do | |
echo $i $(dig $i @$DNS +short | sed '2,$d') | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment