[Top][All Lists]

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

Re: Executing an expect script

From: Jan-Henrik Haukeland
Subject: Re: Executing an expect script
Date: Tue, 15 Nov 2011 16:09:38 +0100

Did you try something like this;

.. exec "/bin/bash -c '2>&1 1>/tmp/debug.txt /path/to/myscript'"

All output will go to the debug.txt file which you can investigate for any 
errors. After debugging you should send output to /dev/null instead or remove 
the stdio redirections.

On Nov 15, 2011, at 3:37 PM, David Parks wrote:

> I'm monitoring a service that, when failed, needs to run (exec) an expect 
> script.   I see in the monit log that the script looks like it's called, but 
> it really isn't. 
> I also tried wrapping the expect script inside a shell script and piped 
> STDOUT and STDERR to a logfile.  The logfile never gets written to.
> Running the expect script manually and within cron works, so I believe it 
> should work by being called from monit.  
> Am I doing something wrong?  How can I debug?
> Thanks,
> David
> --
> To unsubscribe:

reply via email to

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