{chrony,gpsd}: add working gps sync config

This commit is contained in:
Aminda Suomalainen 2024-07-18 17:14:45 +03:00
parent 3b61bebae6
commit af1f376f18
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,4 @@
refclock SHM 0 poll 3 refid GPS1
# unlikely to work with usb
refclock SHM 1 refid GPS2
refclock SOCK /var/run/chrony.ttyUSB0.sock refid SOCK

View File

@ -1,4 +1,10 @@
[Service] [Service]
Type=exec
EnvironmentFile=-/etc/gpsd.aminda.conf EnvironmentFile=-/etc/gpsd.aminda.conf
ExecStart= ExecStart=
ExecStart=/usr/sbin/gpsd --debug 2 --nowait --badtime $GPSD_OPTIONS $OPTIONS $DEVICES $AMINDAGPSD # PRIVACY WARNING! --listenany happily allows anyone to ask where the host is
ExecStartPre=-/usr/sbin/modprobe pps_ldisc
ExecStart=/usr/sbin/gpsd /dev/gps0 --listenany --nowait --foreground $AMINDAGPSD
ExecReload=/usr/bin/killall -HUP gpsd
Restart=always
RestartSec=5s