20.02.2018 00:29, st...@goodey.org пишет:
> Hello,
> 
> 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. 
> However 
> 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: 
> enabled)
>    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 
> (code=exited, 
> status=0/SUCCESS)
>    CGroup: /system.slice/LCDd.service
>            └─2487 /usr/sbin/LCDd -c /home/steve/lcd/LCDd.conf
> 
> Feb 13 09:49:03 mythbuntu systemd[1]: Starting LCDd...
> Feb 13 09:49:03 mythbuntu systemd[1]: LCDd.service: PID file /run/LCDd.pid 
> not readable 
> (yet?) after start: No such file or directory
> steve@mythbuntu:~$
> 
> 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 
> generated? 

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
services.

> Am I right in thinking that LCDd is so old that it hasn't been written with 
> systemd 
> in mind so does not support PIDFile?
> 

PID files predate systemd.

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to