[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] gpsd always starting in foregound (a systemd solution)
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-users] gpsd always starting in foregound (a systemd solution) |
Date: |
Thu, 12 May 2016 12:34:36 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Moe <address@hidden>:
> As others have noted the -N flag accompanied all gpsd starts regardless of
> the contents of /etc/default/gpsd file. This was tracked down to:
>
> # cat /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=/usr/sbin/gpsd -N $GPSD_OPTIONS $DEVICES <-----right in there
>
> [Install]
> WantedBy=multi-user.target
> Also=gpsd.socket
>
> If the flag is removed, and I reloaded the things that make systemd work, I
> could turn off the gpsd as before, but not restart it...if I rebooted, I get
> nothing. Sure it said all was honky dory, or spit back a cryptic confession
> something of which I had no clue.
>
> The 'net was of little help. The spotty trail of tears runs a few years
> back, but with brief exchanges of bad advice and dead ends.
>
> So this is my brief exchange of bad advice.
>
> Add two lines
>
> Type=forking
> PIDfile=/var/run/gpsd.pid
>
> so the file now looks like:
>
> [Unit]
> Description=GPS (Global Positioning System) Daemon
> Requires=gpsd.socket
> # Needed with chrony SOCK refclock
> After=chronyd.service
>
> [Service]
> Type=forking
> PIDfile=/var/run/gpsd.pid
> EnvironmentFile=-/etc/default/gpsd
> ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES
>
> [Install]
> WantedBy=multi-user.target
> Also=gpsd.socket
>
> ##
> gpsd now is controlable via
>
> service gpsd stop
> service gpsd start
> service gpsd restart
>
> There are the irritating pop up authentications, but it works for me, and the
> contents of /etc/default/gpsd are no longer glossed over.
These changes look good (I'm just learning systemd now). Who is generating the
popups, when and why?
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>