Created
April 6, 2016 19:16
-
-
Save eam/a9350c0373a9aa1580917cc1e5727ff3 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
[ -z "$RETRIES" ] && RETRIES=2 | |
retry=0 | |
while true; do | |
/usr/sbin/ntpdate $OPTIONS $tickers &> /dev/null | |
RETVAL=$? | |
[ $RETVAL -eq 0 ] || [ $retry -ge "$RETRIES" ] && break | |
sleep $[10 * (1 << $retry)] | |
retry=$[$retry + 1] | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment