diff --git a/etc/chrony/conf.d/gps.conf b/etc/chrony/conf.d/gps.conf new file mode 100644 index 00000000..981095ae --- /dev/null +++ b/etc/chrony/conf.d/gps.conf @@ -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 diff --git a/etc/systemd/system/gpsd.service.d/aminda-additions.conf b/etc/systemd/system/gpsd.service.d/aminda-additions.conf index ac51cdf9..bb0bcd17 100644 --- a/etc/systemd/system/gpsd.service.d/aminda-additions.conf +++ b/etc/systemd/system/gpsd.service.d/aminda-additions.conf @@ -1,4 +1,10 @@ [Service] +Type=exec EnvironmentFile=-/etc/gpsd.aminda.conf 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