monit-general
[Top][All Lists]
Advanced

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

Re: not only one action in exec


From: Jan-Henrik Haukeland
Subject: Re: not only one action in exec
Date: Wed, 29 Aug 2007 15:08:50 +0200

On 29. aug. 2007, at 12.28, Meurer, Werner wrote:

Is it possible to have more than one action in an exec like:

    check file /etc/monitrc
        with path /etc/monitrc
        if changed checksum then exec "cp /etc/monitrc /etc/monitrc.`date
+%M%d`;/etc/init.d/monit restart"

Use a shell to do this, like so,

exec "/bin/bash -c 'cp /etc/monitrc /etc/monitrc.`date +%M%d` && /etc/ init.d/monit restart'"







reply via email to

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