[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing an expect script
From: |
David Parks |
Subject: |
Re: Executing an expect script |
Date: |
Tue, 15 Nov 2011 14:40:17 -0500 |
Actually, it turned out that in my shell script, I had to:
export SHELL=/bin/bash
before calling the expect script. Even though my env variables were already
setup, when invoking the expect script the SHELL variable wasn't being passed.
Thanks for the help!
-David
On Tue, 15 Nov 2011 16:09:38 +0100
Jan-Henrik Haukeland <address@hidden> wrote:
>
> 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:
> > https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general