add in error checking
This commit is contained in:
parent
89f24a6413
commit
2562803244
1 changed files with 12 additions and 0 deletions
|
@ -77,6 +77,10 @@ sleep ${TIME_DISABLE}
|
||||||
systemctl stop mirrorlist1
|
systemctl stop mirrorlist1
|
||||||
sleep 1
|
sleep 1
|
||||||
systemctl start mirrorlist1
|
systemctl start mirrorlist1
|
||||||
|
if [[ ${?} -ne 0 ]]; then
|
||||||
|
echo "Unable to start mirrorlist1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
sleep ${TIME_RESTART}
|
sleep ${TIME_RESTART}
|
||||||
|
@ -103,6 +107,10 @@ sleep ${TIME_DISABLE}
|
||||||
systemctl stop mirrorlist2
|
systemctl stop mirrorlist2
|
||||||
sleep 1
|
sleep 1
|
||||||
systemctl start mirrorlist2
|
systemctl start mirrorlist2
|
||||||
|
if [[ ${?} -ne 0 ]]; then
|
||||||
|
echo "Unable to start mirrorlist2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
sleep ${TIME_RESTART}
|
sleep ${TIME_RESTART}
|
||||||
curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||||
|
@ -127,6 +135,10 @@ sleep ${TIME_DISABLE}
|
||||||
systemctl stop mirrorlist3
|
systemctl stop mirrorlist3
|
||||||
sleep 1
|
sleep 1
|
||||||
systemctl start mirrorlist3
|
systemctl start mirrorlist3
|
||||||
|
if [[ ${?} -ne 0 ]]; then
|
||||||
|
echo "Unable to start mirrorlist3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
sleep ${TIME_RESTART}
|
sleep ${TIME_RESTART}
|
||||||
curl -q -H mirrors.fedoraproject.org ${mirrorlist3} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
curl -q -H mirrors.fedoraproject.org ${mirrorlist3} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue