Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function download_peer_files() {
- 31 │ declare DL
- 32 │ declare europe_url america_url
- 33 │ europe_url=$(echo "https://raw.githubusercontent.com/yggdrasil-network/public-peers/master/europe/"{czechia,finland,france,germany,netherlands,poland,romania,russia,slovakia,swe
- │ den,united-kingdom}".md")
- 34 │ america_url=$(echo "https://raw.githubusercontent.com/yggdrasil-network/public-peers/master/north-america/"{canada,united-states}".md")
- 35 │ if command -v wget >& /dev/null; then
- 36 │ DL="wget -c --prefer-family=IPv4"
- 37 │ elif command -v curl >& /dev/null; then
- 38 │ DL="curl -O"
- 39 │ else
- 40 │ echo "ОШИБКА. wget или curl не найдены"
- 41 │ fi
- 42 │ echo "Скачиваем списки пиров"
- 43 │ for jj in ${europe_url} ${america_url}
- 44 │ do
- 45 │ if $DL "${jj}" >& /dev/null; then
- 46 │ echo "OK : ${jj}"
- 47 │ else
- 48 │ echo "FAIL : ${jj}"
- 49 │ fi
- 50 │ done
- 51 │ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement