aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 00:01:19 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 00:01:19 +0200
commit2af318e04ce5c036e4a74ee68b096dc45bb198f0 (patch)
treea848a5c07278b2e6a085708eef89df6c683779de
parent3b4cc4d952e63615784018b38602a6db653ddfb0 (diff)
Prevent script freeze when iot.bzh website is not accessible.
-rwxr-xr-xscripts/xds-utils/get-xds-agent.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xds-utils/get-xds-agent.sh b/scripts/xds-utils/get-xds-agent.sh
index 0813875..0404dac 100755
--- a/scripts/xds-utils/get-xds-agent.sh
+++ b/scripts/xds-utils/get-xds-agent.sh
@@ -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