[CentOS] Help with systemd

Wed Sep 23 22:25:38 UTC 2015
Clint Dilks <clintd at waikato.ac.nz>

Hi Jonathan,

Thanks for the feedback


2.) You're going through a lot of effort to generate a pidfile, when
> it's completely unnecesary for systemd services.
>
> I tried not using a pidfile initially and this that case things would
start up and run correctly for a short period but then systemd would put
the service into a failed state and kill it off.
Based on the documentation below I believe that systemd was "guessing" the
Main PID wrong, and so thought the service was dead and killing off all
child processes.
"GuessMainPID=

Takes a boolean value that specifies whether systemd should try to guess
the main PID of a service if it cannot be determined reliably. This option
is ignored unless Type=forking is set and PIDFile= is unset because for the
other types or with an explicitly configured PID file, the main PID is
always known. The guessing algorithm might come to incorrect conclusions if
a daemon consists of more than one process. If the main PID cannot be
determined, failure detection and automatic restarting of a service will
not work reliably. Defaults to yes"