Thanks guys for your input.  I inserted the environments into the
Catalina.sh script so when it loads up the script it will load up the
environments first before trying to startup the program.  I think the
best way is to setup an script just to load up environments such as the
one you have below.

Many thanks
Nelson

-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 11, 2002 1:26 PM
To: Tomcat Users List
Subject: Re: Auto starting Tomcat during boot?



On Fri, 11 Jan 2002, Kirby Vandivort wrote:

> Date: Fri, 11 Jan 2002 12:14:59 -0600
> From: Kirby Vandivort <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Auto starting Tomcat during boot?
>
> We are possibly getting into religious issues, but you are really
better
> off not setting the environ vars somewhere that you don't need them..
> Why not just make a file like the following (what I use) and drop it
> into the appropriate rc directory (modifying as necessary, of course),
> and link to it from init.d ?
>

The below is also the way I tend to do things on Unix systems.

Craig


> #!/bin/sh
> #
>
> CATALINA_HOME=/where/ever/you/have/tomcat
> export CATALINA_HOME
> JAVA_HOME=/where/ever/you/have/java
> export JAVA_HOME
>
> case "$1" in
> start)
>         cmdtext="starting"
>         echo "tomcat $cmdtext."
>         status=`su nobody ${CATALINA_HOME}/bin/catalina.sh start
$2>&1`
>         ;;
> restart)
>         cmdtext="restarting"
>         echo "tomcat $cmdtext."
>         status=`su nobody ${CATALINA_HOME}/bin/catalina.sh stop ;
sleep 10 ; su
> nobody ${CATALINA_HOME}/bin/catalina.sh start $2>&1`
>         ;;
> stop)
>         cmdtext="stopping"
>         echo "tomcat $cmdtext."
>         status=`su nobody ${CATALINA_HOME}/bin/catalina.sh stop $2>&1`
>         ;;
> *)
>         echo "Usage: $0 {start|stop|restart}"
>         exit 1
>         ;;
> esac
>
> if [ $? != 0 ]; then
>         echo "$status"
>         exit 1
> fi
> exit 0
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to