Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <daniel@techandme.se>2017-04-09 23:43:30 +0300
committerGitHub <noreply@github.com>2017-04-09 23:43:30 +0300
commitab649db479a05da1589a2158f446eda699480c37 (patch)
tree3b88db4f4a2d5487db1f0edf3f5e14b165ede498 /static/test_connection.sh
parent05001d9d2fe479f7a3f8fabdfb47f172c8b183e6 (diff)
Rewrite is now done! (#196)
Diffstat (limited to 'static/test_connection.sh')
-rw-r--r--static/test_connection.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/static/test_connection.sh b/static/test_connection.sh
index 64247e4a..89582213 100644
--- a/static/test_connection.sh
+++ b/static/test_connection.sh
@@ -1,11 +1,21 @@
#!/bin/bash
+# shellcheck disable=2034,2059
+true
+# shellcheck source=lib.sh
+. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
-WGET="/usr/bin/wget"
+# Tech and Me © - 2017, https://www.techandme.se/
+
+# Check for errors + debug code and abort if something isn't right
+# 1 = ON
+# 0 = OFF
+DEBUG=0
+debug_mode
$WGET -q --tries=20 --timeout=10 http://www.google.com -O /tmp/google.idx &> /dev/null
if [ ! -s /tmp/google.idx ]
then
- echo -e "\e[31mNot Connected!\e[0m"
+ printf "${Red}Not Connected!${Color_Off}\n"
else
- echo -e "Connected!"
+ printf "Connected!\n"
fi