From ced6867a4e2839953dcbbea10aaa9392ae5cded9 Mon Sep 17 00:00:00 2001 From: andryyy Date: Mon, 2 Dec 2019 18:04:56 +0100 Subject: [PATCH] [Watchdog] Fix ipv6 config check --- data/Dockerfiles/watchdog/watchdog.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/Dockerfiles/watchdog/watchdog.sh b/data/Dockerfiles/watchdog/watchdog.sh index 94c3cacf..667cc573 100755 --- a/data/Dockerfiles/watchdog/watchdog.sh +++ b/data/Dockerfiles/watchdog/watchdog.sh @@ -30,13 +30,6 @@ until [[ $(redis-cli -h redis-mailcow PING) == "PONG" ]]; do sleep 2 done -# One-time check -if grep -qi "$(echo ${IPV6_NETWORK} | cut -d: -f1-3)" <<< "$(ip a s)"; then - if [[ -z "$(get_ipv6)" ]]; then - mail_error "ipv6-config" "enable_ipv6 is true in docker-compose.yml, but an IPv6 link could not be established. Please verify your IPv6 connection." - fi -fi - redis-cli -h redis-mailcow DEL F2B_RES > /dev/null # Common functions @@ -161,6 +154,13 @@ get_container_ip() { [[ ${LOOP_C} -gt 5 ]] && echo 240.0.0.0 || echo ${CONTAINER_IP} } +# One-time check +if grep -qi "$(echo ${IPV6_NETWORK} | cut -d: -f1-3)" <<< "$(ip a s)"; then + if [[ -z "$(get_ipv6)" ]]; then + mail_error "ipv6-config" "enable_ipv6 is true in docker-compose.yml, but an IPv6 link could not be established. Please verify your IPv6 connection." + fi +fi + nginx_checks() { err_count=0 diff_c=0