diff --git a/changelog/items/bugs-fixed/fix-blocklist-skylink.md b/changelog/items/bugs-fixed/fix-blocklist-skylink.md new file mode 100644 index 00000000..b7b6d38d --- /dev/null +++ b/changelog/items/bugs-fixed/fix-blocklist-skylink.md @@ -0,0 +1,2 @@ +- Fix `blocklist-skylink.sh` script that didn't removed blocked skylink from + nginx cache. \ No newline at end of file diff --git a/scripts/blocklist-skylink.sh b/scripts/blocklist-skylink.sh index 528779ca..e9d7f778 100755 --- a/scripts/blocklist-skylink.sh +++ b/scripts/blocklist-skylink.sh @@ -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}"