This simply adds a 60 second waiting period before trying to update. In tests 10 seconds seemed to be enough, but I added a few extra seconds just to be sure.
The real solution will work with a while loop like:
WAIT_FOR_SERVICES = (
"while [[ $(systemctl is-active {service}) == 'active' ]]; do echo 'Waiting for service {service}'; sleep 2; done",
"Waiting for service {service}.")
This simply adds a 60 second waiting period before trying to update. In tests 10 seconds seemed to be enough, but I added a few extra seconds just to be sure.
The real solution will work with a while loop like: