blacklisting script

This commit is contained in:
Karol Wypchlo 2020-06-01 11:17:44 +02:00
parent 0b821d0a26
commit 9449c34a23
1 changed files with 15 additions and 0 deletions

15
setup-scripts/blacklist.sh Executable file
View File

@ -0,0 +1,15 @@
#! /usr/bin/env bash
set -e # exit on first error
if [ -z "$1" ]; then
echo "Please provide a skylink to blacklist" && exit 1
fi
for server in "germany.siasky.net" "us-east.siasky.net" "us-west.siasky.net" "helsinki.siasky.net" "siasky.dev";
do
echo "⌁ Connecting to ${server}"
ssh -t user@${server} 'curl -A Sia-Agent --user "":$(cat ~/.sia/apipassword) --data '"'"'{"add":["'$1'"]}'"'"' "localhost:9980/skynet/blacklist"'
done
echo "✓ All portals succesfully blacklisted provided skylink"