2024-11-21 13:19:55 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Author : Gaston Gonzalez
|
|
|
|
|
# Date : 21 November 2024
|
2025-11-13 11:45:29 -07:00
|
|
|
# Updated : 13 November 2025
|
2024-11-21 13:19:55 -07:00
|
|
|
# Purpose : Determines if time has been synchronized via GPS
|
|
|
|
|
|
|
|
|
|
if [ ! -e /dev/et-gps ]; then
|
|
|
|
|
et-log "No GPS detected. Can't verify time sync"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2025-11-13 11:45:29 -07:00
|
|
|
TRACKING_INFO=$(chronyc tracking | grep NMEA)
|
2024-11-21 13:19:55 -07:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
|
et-log "GPS plugged in, but not used for time source. There may an internet connection."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
et-log "Time appears to be synched via GPS"
|
|
|
|
|
echo ""
|
|
|
|
|
chronyc tracking | grep time
|