From 42c82be8f54574f01346676f25463f78ed40d8f9 Mon Sep 17 00:00:00 2001 From: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:17:47 +0200 Subject: [PATCH] Added skip-ping-check Variable to skip DNS ICMP if deactivated. --- update.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index 2f3364287..1c564c8ed 100755 --- a/update.sh +++ b/update.sh @@ -238,8 +238,11 @@ while (($#)); do --no-update-compose) NO_UPDATE_COMPOSE=y ;; + --skip-ping-check) + SKIP_PING_CHECK=y + ;; --help|-h) - echo './update.sh [-c|--check, --ours, --gc, --no-update-compose, --prefetch, --skip-start, -f|--force, -h|--help] + echo './update.sh [-c|--check, --ours, --gc, --no-update-compose, --prefetch, --skip-start, --skip-ping-check, -f|--force, -h|--help] -c|--check - Check for updates and exit (exit codes => 0: update available, 3: no updates) --ours - Use merge strategy option "ours" to solve conflicts in favor of non-mailcow code (local changes over remote changes), not recommended! @@ -247,6 +250,7 @@ while (($#)); do --no-update-compose - Do not update docker-compose --prefetch - Only prefetch new images and exit (useful to prepare updates) --skip-start - Do not start mailcow after update + --skip-ping-check - Skip ICMP Check to public DNS resolvers (Use it only if you´ve blocked any ICMP Connections to your mailcow machine). -f|--force - Force update, do not ask questions ' exit 1 @@ -533,12 +537,17 @@ elif [[ ${option} == "WATCHDOG_VERBOSE" ]]; then fi done -echo -en "Checking internet connection... " -if ! check_online_status; then - echo -e "\e[31mfailed\e[0m" - exit 1 +if [[( ${SKIP_PING_CHECK} == "y")]]; then +echo -e "\e[32mSkipping Ping Check...\e[0m" + else - echo -e "\e[32mOK\e[0m" + echo -en "Checking internet connection... " + if ! check_online_status; then + echo -e "\e[31mfailed\e[0m" + exit 1 + else + echo -e "\e[32mOK\e[0m" + fi fi echo -e "\e[32mChecking for newer update script...\e[0m"