Folks,
I need help please to implement the retry logic through apt-get tool. Here is the scenario.
1-Try to deploy package
2-If it succeed, we process the next instruction.
3-If it fails, retry within 60sec.
4- stop retrying after 30mins, and log errors.
Anyone can confirm that the below script works as expected
while ! echo y | sudo apt-get install lamp-server^ &> /home/azureuser/aptlamp.log
do
sleep 60
sudo apt-get install lamp-server^ &> /home/azureuser/aptlamp.log
done
Thanks,
Bookmarks