|
From: | Martin Pala |
Subject: | Re: [monit-dev] Systemd unit file (also: repo?) |
Date: | Wed, 11 Jan 2012 22:25:32 +0100 |
On Jan 9, 2012, at 11:10 PM, Maxim Burgerhout wrote:
Hi Maxim, thanks for the monit.service file, we can include it to monit contributions as an template. According to systemd documentation you should also include the "PIDFile=" option if the type is set to "forking" => something like this should be also added to the service file so systemd will be able to detect if the daemon exited: PIDFile=/var/run/monit.pid The systemd documentation also mentions the preference of "simple" type over "forking" - i think monit should work fine with it, you just need to add the "-I" option (capital "i"), so monit won't daemonize (this can be also used when monit is started from traditional sysv init): ExecStart=/usr/bin/monit -I Please can you try the following service file? (using simple type with the -I option): --8<-- [Unit] Description=Pro-active monitoring utility for unix systems After=network.target [Service] Type=simple ExecStart=/usr/bin/monit -I ExecStop=/usr/bin/monit quit ExecReload=/usr/bin/monit reload [Install] WantedBy=multi-user.target --8<-- Best regards, Martin |
[Prev in Thread] | Current Thread | [Next in Thread] |