This commit is contained in:
Farid Musa 2024-01-01 21:59:29 +04:00
parent 71393a503e
commit 9d21df39a4
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 ${OVPN_COMPOSE_NAME}_vpnet "$dns_container_id"
docker network connect ${OVPN_COMPOSE_NAME}_ovpn-net "$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 ${OVPN_COMPOSE_NAME}_vpnet "$dns_container_id"
docker network disconnect ${OVPN_COMPOSE_NAME}_ovpn-net "$dns_container_id"
fi