On Wed, Jan 11, 2012 at 10:25:32PM +0100, Martin Pala wrote:
> 
> 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<--

That'll work nicely :) It is nearly the same as the monit.service file I
attached to my first email to the list!

Regards,

Maxim

_______________________________________________
monit-dev mailing list
monit-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/monit-dev

Reply via email to