Browse Source

[Watchdog] Fix ipv6 config check

andryyy 5 years ago
parent
commit
ced6867a4e
1 changed files with 7 additions and 7 deletions
  1. 7 7
      data/Dockerfiles/watchdog/watchdog.sh

+ 7 - 7
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