correct issue where script is always run once

add capture of configure_modem.sh exit code and increment i if configure_modem.sh fails
This commit is contained in:
Robert Colvin 2022-10-20 10:00:13 +02:00 committed by GitHub
parent fc6506b125
commit cca880e92d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,10 +4,12 @@ source functions.sh
for i in {1..4}; do
bash configure_modem.sh
MODEM_CONFIG=$?
if [[ $MODEM_CONFIG -eq 0 ]]; then
break
fi
i=$(($i+1))
sleep 1
done