[Update] Fix problem with deprecated IPv6 NAT container

master
andryyy 2021-08-16 20:02:47 +02:00
parent 23c1181180
commit 4925487b44
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 7 additions and 1 deletions

View File

@ -178,7 +178,13 @@ migrate_docker_nat() {
fi
fi
# Removing legacy container
sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.yml docker-compose.override.yml
sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.yml
if [ -s docker-compose.override.yml ]; then
sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.override.yml
if [[ "$(cat docker-compose.override.yml | sed '/^\s*$/d' | wc -l)" == "2" ]]; then
mv docker-compose.override.yml docker-compose.override.yml_backup
fi
fi
echo -e "\e[32mGreat! \e[0mNative IPv6 NAT is active.\e[0m"
else
echo -e "\e[31mPlease upgrade Docker to version ${DOCKERV_REQ} or above.\e[0m"