Add hack to set correct date with GPS
The GPS unit has a problem with rollover and is 1024 weeks behind, so bump the date forward after gpsdate sets it
This commit is contained in:
parent
1b23f4e558
commit
fd7cdfdcd9
2 changed files with 12 additions and 0 deletions
11
modules/rhizo_base/files/SysmoBTS/gpsdate.service
Normal file
11
modules/rhizo_base/files/SysmoBTS/gpsdate.service
Normal file
|
@ -0,0 +1,11 @@
|
|||
[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
|
Loading…
Add table
Add a link
Reference in a new issue