Advertisement
glennlake

rpi wifi time update

Jul 7th, 2016
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. this is in /etc/rc.local
  2.  
  3. must install rdate first so this will run and set the time
  4.  
  5. #!/bin/sh -e
  6. #
  7. # rc.local
  8. #
  9. # This script is executed at the end of each multiuser runlevel.
  10. # Make sure that the script will "exit 0" on success or any other
  11. # value on error.
  12. #
  13. # In order to enable or disable this script just change the execution
  14. # bits.
  15. #
  16. # By default this script does nothing.
  17.  
  18. # Print the IP address
  19. _IP=$(hostname -I) || true
  20. if [ "$_IP" ]; then
  21. printf "My IP address is %s\n" "$_IP"
  22.  
  23. fi
  24.  
  25. sudo rdate -n -4 time-a.nist.gov &
  26.  
  27. exit 0
  28.  
  29. 'other time servers can be found at the folling website'
  30.  
  31. http://tf.nist.gov/tf-cgi/servers.cgi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement