blob: c9546aea82d9775670e20c5e841f06ca6caeabb6 [file] [log] [blame]
Ray Milkey6e968e12015-09-18 09:55:07 -07001#!/bin/bash
2
3aux=/tmp/stc-$$.log
4trap "rm -f $aux 2>/dev/null" EXIT
5
6url=$1
7
8
9echo curl-with-retry: $*
10
11set -x
12for i in {1..3}; do
13 curl -f -uonos:rocks ${url} >$aux
14 if [ $? = 0 ]; then
15 cat $aux
16 exit 0
17 fi
18 sleep 1
19done
20
21cat $aux
22exit 1
23