Created
April 21, 2014 06:43
-
-
Save mumoshu/11134210 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trial=0; until apt-get update -y || [ $trial -eq 4 ]; do sleep $((2**++trial )); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
いまのところ数分あけるとうまくいくことが多いようなので、
5_2_*trial++などとして、5の部分を適当にかえると
リトライ1回目: 5秒
リトライ2回目: 10秒
リトライ2回目: 20秒
リトライ2回目: 40秒
のように倍々に待ち時間が増えていい感じかもしれません