[Top][All Lists]

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

Re: Basic q's abt monit 4.5.1

From: Ben Hartshorne
Subject: Re: Basic q's abt monit 4.5.1
Date: Tue, 20 Sep 2005 22:43:19 -0700
User-agent: Mutt/1.5.9i

On Wed, Sep 21, 2005 at 06:28:13AM +0100, anuj agrawal wrote:
> Hi Martin,
> [excerpted]
> I have written the code for the startup of my server
> in a shell script like..
> #!/bin/bash
> cd ...
> /*Code for the startup of the server*/
> i made the shell script executable.
> Now,when i directly run this shell script from the
> terminal(>./ it works just fine i.e. the server

The first thing I always check when a shell script works from the
terminal but not under some other condition is whether I have my PATH
correct.  Often, some totally normal command isn't in the PATH.

You might also improve your chances of understanding what went on by
putting some 'echo' statements in your script, and sending all the
output to a file.  You could also try 'set -v' as the first line of your
shell script, and redirect input (i.e. make the monit 'start' command
" > /tmp/yourscript.out 2>&1").  The 'set -v' line tells
the script to echo every shell line before executing it - very useful in
seeing where scripts go wrong.

Without a copy of your script, more detailed suggestions might be
difficult to give.  :(


Ben Hartshorne
email: address@hidden

Attachment: signature.asc
Description: Digital signature

reply via email to

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