The GPS unit has a problem with rollover and is 1024 weeks behind, so bump the date forward after gpsdate sets it
11 lines
301 B
Desktop File
11 lines
301 B
Desktop File
[Unit]
|
|
Description=Set time based on GPS
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=/etc/default/gpsdate
|
|
ExecStart=/usr/sbin/gpsdate --no-detach ${GPSDATE_HOST} ${GPSDATE_PORT}
|
|
ExecStopPost=/bin/bash -c "sleep 1; date $(date +%%m%%d%%H%%M%%Y.%%S -d \"+1024 weeks\")"
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|