[Top][All Lists]

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

Re: monit-general Digest, Vol 40, Issue 15

From: Jan-Henrik Haukeland
Subject: Re: monit-general Digest, Vol 40, Issue 15
Date: Tue, 23 May 2006 10:18:12 +0200

On 23. mai. 2006, at 09.08, rushi wrote:

I tried the same thing sir from the exec directly as

exec "/bin/bash /etc/rc.d/init.d/heartbeat stop"

Assuming heartbeat is a proper shell script, try

  exec "/etc/rc.d/init.d/heartbeat stop"

or if you call a shell as in your example, use -C to tell the shell to interpret the string as a command line, like so

  exec "/bin/bash -C '/etc/rc.d/init.d/heartbeat stop'"

The technical details here is that monit's exec is a call to the systems exec function which does not start a shell but a program. See man bash(1) and the built in exec-function which is the same function monit uses.

Jan-Henrik Haukeland

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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