blob: 7156cf7fa1ce70bcc742029c24cdfbe35ec7d873 [file] [log] [blame]
Ray Milkey6e968e12015-09-18 09:55:07 -07001#!/bin/bash
2
Jon Hallfb6009d2017-02-15 16:01:17 -08003aux=/tmp/stc/stc-$$.log
Ray Milkey6e968e12015-09-18 09:55:07 -07004trap "rm -f $aux 2>/dev/null" EXIT
5
6url=$1
7
8
9echo curl-with-retry: $*
10
Jon Hall880b4e52017-02-16 16:13:38 -080011for i in {1..5}; do
12 curl -f -isS -uonos:rocks ${url} >$aux
Ray Milkey6e968e12015-09-18 09:55:07 -070013 if [ $? = 0 ]; then
14 cat $aux
15 exit 0
16 fi
17 sleep 1
18done
19
20cat $aux
21exit 1
22