From 8082eb782394ea6d973badb0c699fc0c46c01722 Mon Sep 17 00:00:00 2001 From: Tortue Torche Date: Sat, 10 Aug 2019 23:36:43 -0400 Subject: [PATCH] Extract services stack filter to a local variable --- psu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/psu b/psu index a6450ff..941d687 100644 --- a/psu +++ b/psu @@ -1056,12 +1056,14 @@ tasks_healthy() { services() { local services + local filter_service + filter_service="\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}" services=$(http \ --check-status \ --ignore-stdin \ --verify=$HTTPIE_VERIFY_SSL \ "$PORTAINER_URL/api/endpoints/$PORTAINER_ENDPOINT/docker/services" \ - filters=="{\"label\":{\"com.docker.stack.namespace=$PORTAINER_STACK_NAME\":true}}" \ + filters=="{$filter_service}" \ "Authorization: Bearer $AUTH_TOKEN") check_for_errors $? "$services" echo "$services"