On Mon, Feb 19, 2018 at 11:29 PM, <st...@goodey.org> wrote:
> 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.
It might be recommended in some cases (the more complex the daemon is), but
useless in your case.
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 created by your daemon process.
If your daemon does not support creating pidfiles, just don't use the
PIDFile= option in the first place...
> 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?
No; it's almost the opposite. Pidfiles have been in use for several decades
with sysvinit (they were one of the primary methods of service
identification), but became practically optional with systemd's
systemd-devel mailing list