aboutsummaryrefslogtreecommitdiff
path: root/installation/nginx-cache-purge.sh.example
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-06-03 14:56:54 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-06-03 21:10:41 +0300
commit3fd27954122655f7a18bb75f35ad129024796010 (patch)
tree9a7a262f54013494813535869a3e69eff6acdb18 /installation/nginx-cache-purge.sh.example
parent64b7b0ee3b13602b8984f17069e59673894b1f3b (diff)
downloadpleroma-3fd27954122655f7a18bb75f35ad129024796010.tar.gz
fix purge script
Diffstat (limited to 'installation/nginx-cache-purge.sh.example')
-rwxr-xr-xinstallation/nginx-cache-purge.sh.example5
1 files changed, 3 insertions, 2 deletions
diff --git a/installation/nginx-cache-purge.sh.example b/installation/nginx-cache-purge.sh.example
index b2915321c..83a3a6df2 100755
--- a/installation/nginx-cache-purge.sh.example
+++ b/installation/nginx-cache-purge.sh.example
@@ -13,7 +13,7 @@ CACHE_DIRECTORY="/tmp/pleroma-media-cache"
## $3 - (optional) the number of parallel processes to run for grep.
get_cache_files() {
local max_parallel=${3-16}
- find $2 -maxdepth 2 -type d | xargs -P $max_parallel -n 1 grep -E Rl "^KEY:.*$1" | sort -u
+ find $2 -maxdepth 2 -type d | xargs -P $max_parallel -n 1 grep -E -Rl "^KEY:.*$1" | sort -u
}
## Removes an item from the given cache zone.
@@ -33,8 +33,9 @@ purge() {
do
echo "$SCRIPTNAME delete \`$url\` from cache ($CACHE_DIRECTORY)"
purge_item $url $CACHE_DIRECTORY
+ echo "\n"
done
}
-purge $1
+purge $@