monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit-dev] Systemd unit file (also: repo?)


From: Maxim Burgerhout
Subject: Re: [monit-dev] Systemd unit file (also: repo?)
Date: Wed, 11 Jan 2012 23:42:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]