Yo Paul!
I highly discourage running without the "-n" option.
Any idea why last week no one could find a working systemd config?
On Wed, 26 Feb 2020 19:50:25 -0800
Paul Theodoropoulos via <address@hidden> wrote:
I run raspbian on a pi for my timeserver. It uses systemd of course.
I've no problems with this systemd configuration, should anyone else
find it useful...
root@ A-NTPsec: ~ # cat /etc/systemd/system/gpsd.service | grep -v ^#
[Unit]
Description=GPS (Global Positioning System) Daemon
After=partrt.service
Before=timeservice.service
Requires=timeservice.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/gpsd
EnvironmentFile=-/etc/sysconfig/gpsd
ExecStartPre=stty -F /dev/gpsd0 raw 115200 cs8 clocal -cstopb
ExecStart=/usr/local/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES
ExecStartPost=/usr/local/bin/sched.gpsd
ExecStartPost=/bin/sleep 5
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
root@ A-NTPsec: ~ # cat /etc/default/gpsd | grep -v ^#|grep -v ^$
START_DAEMON="true"
DEVICES="/dev/gpsd0"
GPSD_OPTIONS="-r -P /run/gpsd.pid"
root@ A-NTPsec: ~ # pstree -lupa | grep gpsd
__ |-gpsd,1608,nobody -r -P /run/gpsd.pid /dev/gpsd0
__ |____ `-{gpsd},1632
In the gpsd service file, you can ignore 'After'/'Before'/'Requires'
in the Unit portion, as they're specific to the CPU
partitioning/scheduler regime I run it under, and running it before
ntpd. Same for the 'ExecStartPost' entries.
Anyway, the above works fine for me.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
address@hidden Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin