[gpsd-dev] New 0.5 draft of the SemPiTernal HOWTO

Mike bellyacres at gmail.com
Tue May 10 18:40:56 UTC 2016


On 05/10/2016 10:42 AM, Eric S. Raymond wrote:
> Bernd Zeimetz <bernd at bzed.de>:
>> The sane way would be to use systemd to ensure that they keep running.
>> If systemd eats ressources on your machine, maybe deactivating the
>> journal will help.
> Do you mean that systemd does automatic restart of service daemons?
>
> If so, I agree that might be worthwhile.  I would welcome a pointer
> to a set of service files I might use as a model.
>
> I note, however, tht the Debian/Ubunto packaging of Classic NTP does not
> do this.  Instead, it installs SysV-init rc files which it expects systemd
> to pick up and use.
>
> I'm dealing with a lot of movomh parts here.  Tweaking /etc/rc.local is a
> solution I know will work.

Just did a quick test of this...

https://www.freedesktop.org/software/systemd/man/systemd.service.html

 From the above I added "Restart=on-failure" to the following service file.

Killing gpsd with "kill -SIGABRT <pid>" does indeed cause systemd to 
restart the daemon.

Currently I'm running gpsd from my home directory as I've been 
experimenting with some build options as a learning adventure.

cat /usr/lib/systemd/system/gpsd.service

[Unit]
Description=GPS (Global Positioning System) Daemon
Requires=gpsd.socket
# Needed with chrony SOCK refclock
#After=chronyd.service

[Service]
EnvironmentFile=-/etc/default/gpsd
ExecStart=/home/mike/gpsd/gpsd -N $GPSD_OPTIONS $OPTIONS $DEVICES
Restart=on-failure

[Install]
WantedBy=multi-user.target
Also=gpsd.socket

Mike



More information about the devel mailing list