From 3e8c8a5d016b381e749ab3d00a36d7e6e35137b4 Mon Sep 17 00:00:00 2001 From: Filip Rysavy <29089732+firyx@users.noreply.github.com> Date: Fri, 22 Oct 2021 10:23:06 +0200 Subject: [PATCH] Fix blocklist skylink script --- changelog/items/bugs-fixed/fix-blocklist-skylink.md | 2 ++ scripts/blocklist-skylink.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/items/bugs-fixed/fix-blocklist-skylink.md 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 80885b14..25b4df29 100755 --- a/scripts/blocklist-skylink.sh +++ b/scripts/blocklist-skylink.sh @@ -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 "--------------------------------------------"