This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/scripts/blocklist-skylink.sh

17 lines
566 B
Bash
Raw Normal View History

2020-06-01 09:17:44 +00:00
#! /usr/bin/env bash
set -e # exit on first error
if [ -z "$1" ]; then
2020-11-13 16:29:40 +00:00
echo "Please provide a skylink to blocklist" && exit 1
2020-06-01 09:17:44 +00:00
fi
2020-11-13 16:29:40 +00:00
for server in "germany.siasky.net" "us-east.siasky.net" "us-west.siasky.net" "helsinki.siasky.net" "us-va-1.siasky.net" "us-pa-2.siasky.net";
2020-06-01 09:17:44 +00:00
do
2020-06-01 09:22:06 +00:00
echo "⌁ Blacklisting on ${server}"
2020-11-13 16:29:40 +00:00
ssh -q -t user@${server} 'docker exec sia siac skynet blocklist add '$1''
ssh -q -t user@${server} 'rm -rf /home/user/skynet_webportal/docker/data/nginx/cache' # prune nginx cache
2020-06-01 09:17:44 +00:00
done
2020-11-13 16:29:40 +00:00
echo "✓ All portals succesfully blocklisted $1"