pc_engines_apu_ublox_6_timing_gps_ntp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pc_engines_apu_ublox_6_timing_gps_ntp [2015/01/06 09:46] – [Install and configure NTPd] admin | pc_engines_apu_ublox_6_timing_gps_ntp [2021/10/09 15:14] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
- | ~~TOC~~ | ||
Line 97: | Line 96: | ||
* Install lftp. < | * Install lftp. < | ||
- | * Create leap second download script | + | * Create leap second download script: [[get_leap_script|/ |
- | + | ||
- | # This script will download the latest leap second file, | + | |
- | # update the NTP configuration and restart ntpd. | + | |
- | + | ||
- | # Leap second file location | + | |
- | leapremote=" | + | |
- | # | + | |
- | + | ||
- | # Local file name | + | |
- | leaplocaldir="/ | + | |
- | leaplocalfile=" | + | |
- | + | ||
- | # Log file | + | |
- | logfile=/ | + | |
- | + | ||
- | # Get latest leap second file | + | |
- | / | + | |
- | if [ $? -ne 0 ]; then | + | |
- | echo " | + | |
- | exit 1 | + | |
- | fi | + | |
- | + | ||
- | if [ -f " | + | |
- | echo " | + | |
- | else | + | |
- | cd " | + | |
- | / | + | |
- | ln -sfn " | + | |
- | if [ $? -eq 0 ]; then | + | |
- | echo " | + | |
- | else | + | |
- | echo " | + | |
- | exit 1 | + | |
- | fi | + | |
- | service ntp restart | + | |
- | if [ $? -eq 0 ]; then | + | |
- | echo " | + | |
- | else | + | |
- | echo " | + | |
- | exit 1 | + | |
- | fi | + | |
- | fi | + | |
- | </ | + | |
* Change executable mode < | * Change executable mode < | ||
* Download new file weekly. Create **/ | * Download new file weekly. Create **/ | ||
Line 146: | Line 102: | ||
/ | / | ||
* Change executable mode < | * Change executable mode < | ||
- | |||
====Verify==== | ====Verify==== | ||
* Make sure gpsd and ntpd start at boot. If not, enable it.< | * Make sure gpsd and ntpd start at boot. If not, enable it.< |
pc_engines_apu_ublox_6_timing_gps_ntp.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1