Created
May 12, 2017 18:27
-
-
Save nick-jonas/1e959f0f3f6a25a99f1851e6148291c1 to your computer and use it in GitHub Desktop.
Place this snippet in your /etc/rc.local file so an RPI will sync time on boot
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
#!/bin/sh | |
#force time set with NTP server | |
clear | |
echo Setting the time and date. Your sudo password may be required below... | |
echo | |
sudo ntpdate -bu pool.ntp.org | |
echo | |
echo The time and date are now set to `date` | |
echo | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment