tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: AW: Tomcat 4.0.4 init.d startup script
Date Mon, 05 Aug 2002 16:21:09 GMT

That would work, with the caveat that "source" is a bash builtin, not a sh
builtin, so for the line "source /etc/profile" to work, the script would
have to be running in the bash environment, not the Bourne environment.

As far as I know, exporting environment variables in script #1 does nothing
towards making those variables available to script #2.  Using the ".
/scriptname" syntax doesn't work.

Since startup is done as root, putting the environment variables in
/etc/profile seems like a good workaround to me.

John Turner
jturner@NOSPAM.aas.com


-----Original Message-----
From: Larry Meadors [mailto:Larry.Meadors@plumcreek.com]
Sent: Monday, August 05, 2002 12:13 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: AW: Tomcat 4.0.4 init.d startup script


I did it this way:

1) added CATALINA_HOME, JAVA_HOME... to 
   /etc/profile
2) added to catalina.sh this line:
   source /etc/profile
3) created a link in /etc/rc3.d 
   to $CATALIA_HOME/bin/catalina.sh 
   named S57tomcat
4) created a link in /etc/rc0.d 
   to $CATALIA_HOME/bin/catalina.sh 
   named K57tomcat
5) created a link in /etc/rc6.d 
   to $CATALIA_HOME/bin/catalina.sh 
   named K57tomcat

Larry

>>> ralph.einfeldt@uptime-isc.de 08/05/02 09:22 AM >>>
As Richard wrote CATALINA_HOME is set in 
/etc/sysconfig/tomcat4.
This file is sourced in the start script.

So that shouldn't cause a problem.

Maybe he sould have a look at 
sh -x /etc/init.d/tomcat4 start
or 
sh -xv /etc/init.d/tomcat4 start

to see where which substitutions happen (or not).

> -----Urspr√ľngliche Nachricht-----
> Von: Turner, John [mailto:JTurner@AAS.com]
> Gesendet: Montag, 5. August 2002 16:49
> An: 'Tomcat Users List'
> Betreff: RE: Tomcat 4.0.4 init.d startup script 
> 
> How does CATALINA_HOME get set before this script even runs?  

<snip/>

> # Source additional OPTIONS if we have them.
> if [ -f /etc/sysconfig/tomcat4 ] ; then
>     . /etc/sysconfig/tomcat4
> fi

<snip/> 

> Here is my /etc/sysconfig/tomcat4:
> 
> export JAVA_HOME=/usr/java/j2sdk1.4.0
> export CATALINA_BASE=/var/jakarta-tomcat-4.0.4
> export CATALINA_HOME=$CATALINA_BASE

<snip/> 

--
To unsubscribe, e-mail:  
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message