geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Reeder" <reeder...@gmail.com>
Subject Re: status from shell script (System V starup)
Date Wed, 19 Nov 2008 19:00:18 GMT
One certainly could write the script to return extensive status info, and
the status command is not even required, but most System V init scripts
return something like this for status:sshd (pid 8204 2405) is running...
The scripts are mainly for starting and stopping daemons, and the status
command appears to exist to let you know if you should run start or stop.
Perhaps I should keep the list-modules code for an "info" command.


On Wed, Nov 19, 2008 at 9:00 AM, Ted Kirby <ted.kirby@gmail.com> wrote:

> I like the deploy.sh approach.  If you get a proper response, you have
> more confidence the server is running well.  With the other approach,
> the server process could be hung.  It is quick, tho.  If the deploy.sh
> hangs, you'd have to account for that.
>
> On Wed, Nov 12, 2008 at 6:57 PM, Doug Reeder <reeder.29@gmail.com> wrote:
> > I've written a bash shell script to start and stop geronimo, for use with
> > System V startup (scripts in /etc/rc.d/init.d/).
> >
> > Start and stop are straightforward, as the scripts in $GERONIMO_HOME/bin/
> > just need to be called, but status is less obvious.  The best I've come
> up
> > with so far is
> >
> > su -l -c "$GERONIMO_HOME/bin/deploy.sh -u $GERONIMO_ADMIN -p
> > $GERONIMO_PASSWORD list-modules" $USER
> >
> > but it's not satisfactory:
> > 1) if geronimo is not running, it produces a stack dump, when all I want
> is
> > a simple message indicating geronimo is not running
>
> Wouldn't > /dev/null and/or 2>/dev/null handle that?
>
> > 2) I have to include the geronimo administrator password in the script
>  (of
> > course, it also needs to be in the script so geronimo can be shut down).
>
> You could use deploy --login:
>
> http://cwiki.apache.org/GMOxDOC22/tools-and-commands.html#Toolsandcommands-Login
>
> > Can anyone suggest something better?   If geronimo is running, what would
> be
> > best is a short list of all the ports it's listening on.  (Then one could
> > use netstat or whatever to see if one can actually access them).
>
> Ted Kirby
>

Mime
View raw message