Fix blocklist skylink script

This commit is contained in:
Filip Rysavy 2021-10-22 10:23:06 +02:00
parent 9dad4ee4bc
commit 3e8c8a5d01
No known key found for this signature in database
GPG Key ID: EA1F430401C92D99
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
- Fix `blocklist-skylink.sh` script that didn't removed blocked skylink from
nginx cache.

View File

@ -50,7 +50,7 @@ do
for skylink in "${skylinks[@]}";
do
echo ".. ⌁ Blocking skylink ${skylink} on ${server}"
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}"
echo "--------------------------------------------"