From 9e4ac0eb38609d799e1b8cc34cf95a0eb1ddc449 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 21 Oct 2021 14:41:24 -0400 Subject: [PATCH] add missing servers and missing blocklist command to script --- scripts/blocklist-skylink.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/blocklist-skylink.sh b/scripts/blocklist-skylink.sh index 80885b14..528779ca 100755 --- a/scripts/blocklist-skylink.sh +++ b/scripts/blocklist-skylink.sh @@ -38,20 +38,30 @@ fi # iterate through all servers, block the skylinks and purge it from cache ######################################################################### declare -a servers=( "eu-ger-1.siasky.net" "eu-ger-2.siasky.net" "eu-ger-3.siasky.net" "eu-ger-4.siasky.net" "eu-ger-5.siasky.net" "eu-ger-6.siasky.net" "eu-ger-7.siasky.net" "eu-ger-8.siasky.net" - "eu-fin-1.siasky.net" "eu-fin-2.siasky.net" "eu-fin-3.siasky.net" "eu-fin-4.siasky.net" - "eu-pol-1.siasky.net" "eu-pol-2.siasky.net" "eu-pol-3.siasky.net" + "eu-ger-9.siasky.net" "eu-ger-10.siasky.net" "eu-ger-11.siasky.net" "eu-ger-12.siasky.net" + "eu-fin-1.siasky.net" "eu-fin-2.siasky.net" "eu-fin-3.siasky.net" "eu-fin-4.siasky.net" "eu-fin-5.siasky.net" "eu-fin-6.siasky.net" "eu-fin-7-siasky.net" "eu-fin-8.siasky.net" + "eu-fin-9.siasky.net" "eu-fin-10.siasky.net" "eu-fin-11.siasky.net" "eu-fin-12.siasky.net" "eu-fin-13.siasky.net" "eu-fin-14.siasky.net" "eu-fin-15.siasky.net" + "eu-pol-1.siasky.net" "eu-pol-2.siasky.net" "eu-pol-3.siasky.net" "eu-pol-4.siasky.net" "eu-pol-5.siasky.net" + "us-ny-1.siasky.net" "us-ny-2.siasky.net" "us-or-1.siasky.net" "us-or-2.siasky.net" + "us-la-1.siasky.net" "us-la-2.siasky.net" "us-la-3.siasky.net" "us-pa-1.siasky.net" "us-pa-2.siasky.net" - "us-va-1.siasky.net" "us-va-2.siasky.net" "us-va-3.siasky.net" - "as-hk-1.siasky.net" + "us-va-1.siasky.net" "us-va-2.siasky.net" "us-va-3.siasky.net" "us-va-4.siasky.net" "us-va-5.siasky.net" "us-va-6.siasky.net" + "as-hk-1.siasky.net" "as-sp-1.siasky.net" "as-sp-2.siasky.net" "siasky.xyz" "dev1.siasky.dev" "dev2.siasky.dev" "dev3.siasky.dev") for server in "${servers[@]}"; do for skylink in "${skylinks[@]}"; do echo ".. ⌁ Blocking skylink ${skylink} on ${server}" + + # Add to blocklist + ssh -q -t user@${server} "docker exec sia siac skynet blocklist add ${skylink}" + + # Remove from NGINX cache cached_files_command="find /data/nginx/cache/ -type f | xargs -r grep -Elsq '^Skynet-Skylink: ${skylink}'" ssh -q -t user@${server} "docker exec -it nginx bash -c ${cached_files_command} | xargs -r rm" + echo ".. ⌁ Skylink ${skylink} Blocked on ${server}" echo "--------------------------------------------" done