clear nginx cache after blacklisting

This commit is contained in:
Karol Wypchlo 2020-06-01 17:12:57 +02:00
parent af0e639e6d
commit 5b12f3d41e
1 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,8 @@ for server in "germany.siasky.net" "us-east.siasky.net" "us-west.siasky.net" "he
do
echo "⌁ Blacklisting on ${server}"
ssh -q -t user@${server} 'curl -A Sia-Agent --user "":$(cat ~/.sia/apipassword) --data '"'"'{"add":["'$1'"]}'"'"' "localhost:9980/skynet/blacklist"'
ssh -q -t user@${server} 'rm -rf ~/skynet_webportal/docker/data/nginx/cache' # remove cache from docker-managed portals
ssh -q -t user@${server} 'sudo rm -rf /tmp/nginx' # remove cache from legacy non-docker portals
done
echo "✓ All portals succesfully blacklisted provided skylink"