Last active
August 29, 2015 14:04
-
-
Save song940/c57ee378c30e99a7cf51 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
/etc/init.d/ntp stop | |
until ping -nq -c3 8.8.8.8 > /dev/null; do | |
echo "Waiting for network..." | |
done | |
ntpdate -s time.nist.gov | |
/etc/init.d/ntp start | |
echo "Time now : `date`" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment