From 9c51ea802e0dec45477d4962fb809a0d0e8ca866 Mon Sep 17 00:00:00 2001 From: gyurix Date: Thu, 8 Jun 2023 14:37:35 +0000 Subject: [PATCH] restarting proxies when any certificate created --- scripts/check_certificates.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_certificates.sh b/scripts/check_certificates.sh index a677198..a31890a 100755 --- a/scripts/check_certificates.sh +++ b/scripts/check_certificates.sh @@ -79,9 +79,9 @@ create_self_signed_certificate() { PROXY_NAMES=""; # Check services with running containers by roles for CONTAINER in $(jq -r --arg ROLE $ROLE '.containers[] | select(.ROLES==$ROLE)' /$PROXY_SERVICE_FILE | jq -r .NAME) ; do - UP=$(docker ps | grep $CONTAINER | grep Up | wc -l) + RUNNING_CONTAINER=$(docker ps | grep $CONTAINER | grep Up) PROXY_NAMES=$PROXY_NAMES" "$CONTAINER; - RUNNING_CONTAINERS=$((RUNNING_CONTAINERS + UP)) + RUNNING_CONTAINERS=$RUNNING_CONTAINERS" "$RUNNING_CONTAINER; done; # In case of no running proxies found, try to start the service