From 24e32b23590ec66428da6ab966496f2dda6a8145 Mon Sep 17 00:00:00 2001 From: pagdot Date: Mon, 13 Feb 2023 23:06:25 +0100 Subject: [PATCH] Use fixed strings for grep patterns If you set a fancy a swag_url label involving a regex this can trip grep causing it to detect changes *every single run* causing my nginx to just give up now an then when reloading the config :( --- root/app/auto-proxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/app/auto-proxy.sh b/root/app/auto-proxy.sh index b52c0995..cc132639 100755 --- a/root/app/auto-proxy.sh +++ b/root/app/auto-proxy.sh @@ -18,7 +18,7 @@ else if [ "${VAR_VALUE}" == "null" ]; then VAR_VALUE="" fi - if ! grep -q "${VAR}=\"${VAR_VALUE}\"" "/auto-proxy/${CONTAINER}.conf"; then + if ! grep -F -q "${VAR}=\"${VAR_VALUE}\"" "/auto-proxy/${CONTAINER}.conf"; then AUTO_GEN="${CONTAINER} ${AUTO_GEN}" echo "**** Labels for ${CONTAINER} changed, will generate new conf. ****" break