From 1c1f3c6ec113de0abd1f706b5455e4f146a69a9d Mon Sep 17 00:00:00 2001 From: Filip Rysavy <29089732+firyx@users.noreply.github.com> Date: Mon, 6 Dec 2021 16:13:00 +0100 Subject: [PATCH] Fix condition mistake --- scripts/lib/nginx-prune-cache-subscript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/nginx-prune-cache-subscript.sh b/scripts/lib/nginx-prune-cache-subscript.sh index 5994f49f..99edb899 100755 --- a/scripts/lib/nginx-prune-cache-subscript.sh +++ b/scripts/lib/nginx-prune-cache-subscript.sh @@ -19,7 +19,7 @@ do # We always delete all files larger than MAX_KEEP_FILE_SIZE. # We keep all files smaller than MAX_KEEP_FILE_SIZE when cache size is # below MAX_CACHE_DIR_SIZE, then we delete also smaller files. - if (("$size" <= "$MAX_KEEP_FILE_SIZE" && "$total" < "$new_total")) + if (("$size" <= "$MAX_KEEP_FILE_SIZE" && "$new_total" < "$MAX_CACHE_DIR_SIZE")) then total=$new_total continue