blob: c77b2841680441b54f4d62e1b280decfb9a0fe2a [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
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