This commit is contained in:
Farid Musa 2024-01-01 21:58:53 +04:00
parent ae7a9d4e08
commit 71393a503e
2 changed files with 2 additions and 2 deletions

View File

@ -4,5 +4,5 @@ set -exo pipefail
dns_container_id="$(docker ps | grep "$OVPN_DNS_CONTAINER_NAME_PATTERN" | awk '{ print $1 }' 2> /dev/null)"
if [ "$dns_container_id" != "" ]; then
echo "Connecting network 'vpnet' to $dns_container_id"
docker network connect vpnet "$dns_container_id"
docker network connect ${OVPN_COMPOSE_NAME}_vpnet "$dns_container_id"
fi

View File

@ -4,5 +4,5 @@ set -exo pipefail
dns_container_id="$(docker ps | grep "$OVPN_DNS_CONTAINER_NAME_PATTERN" | awk '{ print $1 }' 2> /dev/null)"
if [ "$dns_container_id" != "" ]; then
echo "Disconnecting network 'vpnet' from $dns_container_id"
docker network disconnect vpnet "$dns_container_id"
docker network disconnect ${OVPN_COMPOSE_NAME}_vpnet "$dns_container_id"
fi