From 19df46692ff9c00d6b422c249d5eb8b05e4a3e8a Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sun, 27 Sep 2020 21:43:39 +0200 Subject: [PATCH] Split PLUGIN_NETWORKS --- plugin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index a06d920..1b5799b 100755 --- a/plugin.sh +++ b/plugin.sh @@ -12,7 +12,8 @@ REMOTE_DOCKER_HOST="ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" create_networks() { echo "--- start create_networks ---" - for NETWORK in $PLUGIN_NETWORKS; do + IFS=',' read -ra NETWORKS <<< "$PLUGIN_NETWORKS" + for NETWORK in "${NETWORKS[@]}"; do docker -H "$REMOTE_DOCKER_HOST" \ network create --driver=overlay "$NETWORK" --scope swarm || true done