Place this snippet in your /etc/rc.local file so an RPI will sync time on boot
#!/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