On Jan 11, 2012, at 11:42 PM, Maxim Burgerhout wrote: > 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
I have tested the monit.service on FC16 - works fine, added some comments to it. The file is part of the distribution now (contrib/monit.service), the path in the monit template is set to /usr/local/bin/monit where it installs by default. Also the wiki-howto entry was created which describes the systemd setup for monit: http://mmonit.com/wiki/Monit/Systemd Thanks for the file Maxim :) Regards, Martin _______________________________________________ monit-dev mailing list monit-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/monit-dev