2024-01-01 12:14:00 -05:00
|
|
|
#!/usr/bin/env bash
|
2024-01-01 12:54:51 -05:00
|
|
|
set -exo pipefail
|
2024-01-01 12:14:00 -05:00
|
|
|
|
|
|
|
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"
|
2024-01-01 12:59:29 -05:00
|
|
|
docker network disconnect ${OVPN_COMPOSE_NAME}_ovpn-net "$dns_container_id"
|
2024-01-01 12:14:00 -05:00
|
|
|
fi
|