Rather than hard sleep 45, use curl retry
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
4567fd57b6
commit
084801fc55
1 changed files with 4 additions and 4 deletions
|
@ -30,8 +30,8 @@ fi
|
|||
systemctl start mirrorlist2
|
||||
echo "enable server mirror-lists/mirrorlist-local2" | nc -U /var/run/haproxy-admin >& /dev/null
|
||||
|
||||
sleep 45
|
||||
curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f
|
||||
sleep 5
|
||||
curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist2 did not start correctly"
|
||||
exit 1
|
||||
|
@ -46,8 +46,8 @@ systemctl restart mirrorlist1
|
|||
sleep 1
|
||||
echo "enable server mirror-lists/mirrorlist-local1" | nc -U /var/run/haproxy-admin >& /dev/null
|
||||
|
||||
sleep 45
|
||||
curl -q -H mirrors.fedoraproject.org "http://localhost:18081/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f
|
||||
sleep 5
|
||||
curl -q -H mirrors.fedoraproject.org "http://localhost:18081/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist1 did not restart correctly"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue