pc_engines_apu_ublox_6_timing_gps_ntp
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
pc_engines_apu_ublox_6_timing_gps_ntp [2015/01/06 09:37] – [Verify clients] admin | pc_engines_apu_ublox_6_timing_gps_ntp [2015/01/24 17:39] – [Leap second file] admin | ||
---|---|---|---|
Line 83: | Line 83: | ||
# By default, exchange time with everybody, but don't allow configuration. | # By default, exchange time with everybody, but don't allow configuration. | ||
- | restrict -4 default kod notrap nomodify nopeer noquery | + | restrict -4 default |
- | restrict -6 default kod notrap nomodify nopeer noquery | + | restrict -6 default |
# Local users may interrogate the ntp server more closely. | # Local users may interrogate the ntp server more closely. | ||
Line 92: | Line 92: | ||
* Disable automatic update of ntp package. Remember to update it yourself in case of security updates!< | * Disable automatic update of ntp package. Remember to update it yourself in case of security updates!< | ||
* Reboot and check results. | * Reboot and check results. | ||
+ | |||
+ | ====Leap second file==== | ||
+ | Automatic download of new leap second file. | ||
+ | |||
+ | * Install lftp. < | ||
+ | * Create leap second download script: [[get_leap_script|/ | ||
+ | * Change executable mode < | ||
+ | * Download new file weekly. Create **/ | ||
+ | |||
+ | / | ||
+ | * 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.< | ||
Line 125: | Line 136: | ||
*SHM(0) | *SHM(0) | ||
</ | </ | ||
- | ====Leap second file==== | ||
- | Automatic download of new leap second file. | ||
- | |||
- | * Install lftp. < | ||
- | * Create leap second download 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 < | ||
- | * Download new file weekly. Create **/ | ||
- | |||
- | / | ||
- | * Change executable mode < | ||
- | |||
- | ====Verify==== | ||
* Show connected clients:< | * Show connected clients:< | ||
* Verify leap variables:< | * Verify leap variables:< |
pc_engines_apu_ublox_6_timing_gps_ntp.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1