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
583 B
Bash
Executable File

#! /usr/bin/env bash
set -e # exit on first error
if [ -z "$1" ]; then
echo "Please provide a skylink to blocklist" && exit 1
fi
for server in "germany.siasky.net" "helsinki.siasky.net" "us-west.siasky.net" "us-va-1.siasky.net" "us-pa-1.siasky.net" "us-pa-2.siasky.net" "siasky.xyz";
do
echo "⌁ Blocking skylink on ${server}"
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
done
echo "✓ All portals succesfully blocklisted $1"