public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Added skip-ping-check Variable to skip DNS ICMP if deactivated.
42c82be8
update.sh | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
Diff
diff --git a/update.sh b/update.sh
index 2f336428..1c564c8e 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"