monit-general
[Top][All Lists]
Advanced

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

Re: Path and argument problem... solution?


From: Christian Hopp
Subject: Re: Path and argument problem... solution?
Date: Thu, 29 Aug 2002 09:52:12 +0200 (CEST)

On 28 Aug 2002, Jan-Henrik Haukeland wrote:

> Christian Hopp <address@hidden> writes:


>  - Arguments are only parsed for start and stop program statements

Maybe now...?  There could be "user defined actions"... in addition to
"restart", "stop", et. al. .

(...)

>  - Thus we must start a condition after and only after a START or STOP
>    token is read and the next char we hit is a '"' char.

Yep.

>  - So far so good, but things starts to be slightly complicated
>    because an argument tuple can span over several lines and be a
>    script. For instance this should be a legal start statement entry:
>
>     start = "/bin/sh -c {
>                echo $$> /tmp/pid;
>                /sbin/myserver -x -y -z;
>              }"

And even worse...

   start = "/bin/foo --message 'Monit Rulez!'"

has to work and even...

   start = "/bin/foo --message 'I like LaTeX umlaute "a "o "u'"

or...

   start = "/bin/foo\ bar"


>    If we say that the program is /bin/sh and that there are only two
>    arguments, namely "-c" and "{..}" it actually doesn't have to be so
>    complicated.

But the multi line code needs start conditions. Otherwise it would
complain about "echo" being an unknown token.  And it really not
complicated, it makes it IMO even more readable and maintainable. (-:
You can see much better where you are in a statement or type.


>  - Hm, this may not be so difficult after all, unless you see other
>    complications?

s.o.

(...)

>  - In fact this simplifies the code a great deal and is something we
>    should try to implement I belive.

Absolutely.

> > I think it would be even useful to clean up the whole language a
> > little, tiny bit. (-:
>
> Absolutely. Do you have time and would you like to give yours and this
> proposal a try? If not it looks interesting and something I could do
> to get my mind of the zervlet stuff I'm working with now.

Later... I can try to tidy up the language a bit.  And give you a try
with the programs.  We gonna have maintenance work in our power supply
and network, so it's gonna be difficult for me... that reminds me to
charge the laptop today.

> > PS: Hauk, I hope you had a nice swim.
>
> Well, actually not, the weather suddenly turned for the worse, and now
> when I'm back it looks good again, of course.

Murphy's law.


C.Hopp

-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
Technische Universität Clausthal                         fax: +49-5323-72-3197
  pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/chopp.key.asc  (2001-11-22)





reply via email to

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