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: Mon, 9 Jan 2012 23:10:56 +0100

On Mon, Jan 09, 2012 at 01:55:48PM +0400, Sergey B Kirpichev wrote:
> On Mon, Jan 9, 2012 at 3:24 AM, Maxim Burgerhout <address@hidden> wrote:
> > there is an issue with Monit forking after startup and changing it's PID 
> > when
> > using systemd. The PID file will have the pre-fork PID in it and systemd 
> > will
> > assume the process is exiting (deactivating). well, at least in my tests.
>
> There is NO issue with monit.  Monit uses simple and de-facto standard way
> of startup for daemon (as apache or nginx or just anything from /etc/init.d/).
>
> Looking at *your* docs, it seems to be
> Type=forking
> should solve this "problem" with monit.

It should have been 'forking' indeed, and I tested that when I was writing this
unit file back in October. Back then, I could not get 'forking' to play nice,
which is why I settled for 'simple' in the end. I should have checked the monit
code to see how it implemented forking, but I didn't and made false
assumptions, it seems.

Because of your email, just to be sure, I redid my tests and this time around
it does work. Obviously, I should have done that earlier.

Whether this is due to the version of systemd I used back in October or my, own
failure in testing correctly, I don't know. I must have made some mistake
somewhere.

Long story -> short: I fixed up the unit file (see attachment) and I still hope
the devs are willing to ship this unit file with monit in the future.

Please keep in mind this systemd stuff is new for me, too.

Kind regards,

Maxim

Attachment: monit.service
Description: Text document


reply via email to

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