Skip to content

Instantly share code, notes, and snippets.

@dchapman1988
Created November 25, 2014 17:58
Show Gist options
  • Save dchapman1988/48b431e7456e82bb4834 to your computer and use it in GitHub Desktop.
Save dchapman1988/48b431e7456e82bb4834 to your computer and use it in GitHub Desktop.
Just a shell script to force a time sync.
( /etc/init.d/ntp stop
until ping -nq -c3 8.8.8.8; do
echo "Waiting for network..."
done
ntpdate -s time.nist.gov
/etc/init.d/ntp start )&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment