20.02.2018 00:29, st...@goodey.org пишет:
> Sorry if this question is a bit basic for a devel list, I tried asking it in
> a ubuntu forum but
> didn't get any views, let alone replies.
> I have a PC running Mythbuntu which has an LCD which I had a bit of a
> struggle getting
> going under systemd. However using Type=forking it is now working fine.
> reading the man page for systemd.service is says that it is recommended to
> use PIDFile. I
> have tried adding PIDFile=/run/LCDd.pid but this causes an error message:-
> LCDd.service - LCDd
> Loaded: loaded (/etc/systemd/system/LCDd.service; enabled; vendor preset:
> Active: activating (start) since Tue 2018-02-13 09:49:03 GMT; 1min 8s ago
> Process: 2485 ExecStart=/usr/sbin/LCDd -c /home/steve/lcd/LCDd.conf
> CGroup: /system.slice/LCDd.service
> └─2487 /usr/sbin/LCDd -c /home/steve/lcd/LCDd.conf
> Feb 13 09:49:03 mythbuntu systemd: Starting LCDd...
> Feb 13 09:49:03 mythbuntu systemd: LCDd.service: PID file /run/LCDd.pid
> not readable
> (yet?) after start: No such file or directory
> Removing the line PIDFile=/run/LCDd.pid in LCDd.service and all is good.
> I have tried creating LCDd.pid in /run with root:root but get the same. How
> is the pid file
It is expected to be written by your service binary. Ideally it should
do it only after it has completed initialization and is ready to provide
> Am I right in thinking that LCDd is so old that it hasn't been written with
> in mind so does not support PIDFile?
PID files predate systemd.
systemd-devel mailing list