Merge pull request #1303 from SkynetLabs/fix-blocklist-skylink
Fix blocklist skylink script
This commit is contained in:
commit
d9ba0d754c
|
@ -0,0 +1,2 @@
|
|||
- Fix `blocklist-skylink.sh` script that didn't removed blocked skylink from
|
||||
nginx cache.
|
|
@ -54,12 +54,12 @@ 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}'"
|
||||
cached_files_command="find /data/nginx/cache/ -type f | xargs -r grep -Els '^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}"
|
||||
|
|
Reference in New Issue