Update blocking to ignore fixed names

Docker Compose may use hyphens or underscores, depending on platform or version
pull/47/head
Dan Caseley 2021-12-20 11:16:40 +00:00
parent d6f5761fbc
commit d319c68a10
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
CONTAINER_TO_REMOVE=openfire-docker-compose-xmpp2-1
CONTAINER_TO_REMOVE=$(docker ps --filter status=running --format "{{.Names}}" | grep -E openfire-docker.+xmpp2.1)
CONTAINER_NAME=pumba_node2
echo "About to be blocked from communication: $CONTAINER_TO_REMOVE"

View File

@ -4,7 +4,7 @@
#Example usage: `./remove_node_from_cluster.sh 1` to remove node xmpp1
NODE=$1
CONTAINER_TO_REMOVE=openfire-docker-compose-xmpp"$NODE"-1
CONTAINER_TO_REMOVE=$(docker ps --filter status=running --format "{{.Names}}" | grep -E openfire-docker.+xmpp"$NODE".1)
CONTAINER_NAME=pumba_node"$NODE"
echo "About to be removed from cluster: $CONTAINER_TO_REMOVE"