1
0
Fork 0
mirror of synced 2024-11-16 22:25:33 -05:00
ovpn-admin/start.d/internal_dns.sh

9 lines
320 B
Bash
Raw Normal View History

2024-01-01 12:14:00 -05:00
#!/usr/bin/env bash
2024-01-01 13:00:20 -05:00
set -eo 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 "Connecting network 'vpnet' to $dns_container_id"
2024-01-01 12:59:29 -05:00
docker network connect ${OVPN_COMPOSE_NAME}_ovpn-net "$dns_container_id"
2024-01-01 12:14:00 -05:00
fi