Prevent script freeze when iot.bzh website is not accessible.
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Tue, 29 Aug 2017 22:01:19 +0000 (00:01 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Tue, 29 Aug 2017 22:01:19 +0000 (00:01 +0200)
scripts/xds-utils/get-xds-agent.sh

index 0813875..0404dac 100755 (executable)
@@ -39,6 +39,13 @@ if [ ! -d ${DEST_DIR} ]; then
     exit 1
 fi
 
+# Fisrt check if we can access to iot.bzh (aka ovh.iot)
+ping -c 1 -W 5 www.ovh.iot > /dev/null
+if [ "$?" != "0" ]; then
+    echo "iot.bzh website not accessible !"
+    exit 1
+fi
+
 # Get not existing tarballs
 exitCode=0
 for file in $TARBALLS; do