RE: Idea for dtomcat4 script/conf in webapp.rpm
What do you think of adding a conf variable that allow one to set the location of catalina.out thats independent of $CATALINA_BASE? Something like $CATALINA_LOGDIR? Do you means specific to rpm ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
Opse, sorry. Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. -Mark GOMEZ Henri wrote: What do you think of adding a conf variable that allow one to set the location of catalina.out thats independent of $CATALINA_BASE? Something like $CATALINA_LOGDIR? Do you means specific to rpm ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] # tomcat /etc/rc.d script example configuration file # Use with version 1.07 of the scripts or later # Where your java installation lives JAVA_HOME=/usr/java/jdk # JAVA_HOME=/opt/IBMJava2-13 # You can pass some parameters to java # here if you wish to # JAVACMD=$JAVA_HOME/bin/java -Xms128m -Xmx128m # Where your tomcat installation lives # That change from previous RPM where TOMCAT_HOME # used to be /var/tomcat. # Now /var/tomcat will be the base for webapps only CATALINA_HOME=/var/tomcat4 JASPER_HOME=/var/tomcat4 CATALINA_TMPDIR=/tmp # What user should run tomcat TOMCAT_USER=tomcat4 # You can change your tomcat locale here #LANG=en_US # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) # Just do not forget to export them :) export CATALINA_OPTS=-Xms128m -Xmx128m ulimit -s unlimited export CATALINA_LOG=/var/log/tomcat/catalina.out #!/bin/sh # - # Start/Stop Script for the CATALINA Server # # Environment Variable Prequisites # # CATALINA_HOME May point at your Catalina build directory. # # CATALINA_BASE (Optional) Base directory for resolving dynamic portions # of a Catalina installation. If not present, resolves to # the same directory that CATALINA_HOME points to. # # CATALINA_OPTS (Optional) Java runtime options used when the start, # stop, or run command is executed. # # CATALINA_TMPDIR (Optional) Directory path location of temporary directory # the JVM should use (java.io.tmpdir). Defaults to # $CATALINA_BASE/temp. # # CATALINA_LOG(Optional) Provides alternate output locations for StandardOut # and StandardErr # # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the start, # stop, or run command is executed. # # JPDA_ADDRESS(Optional) Java runtime options used when the jpda start # command is executed. The default is 8000. # # JSSE_HOME (Optional) May point at your Java Secure Sockets Extension # (JSSE) installation, whose JAR files will be added to the # system class path used to start Tomcat. # # $Id: catalina.sh,v 1.20.2.1 2002/01/30 18:10:39 patrickl Exp $ # - TOMCAT_CFG=/etc/tomcat4/conf/tomcat4.conf [ -r $TOMCAT_CFG ] . ${TOMCAT_CFG} # Set standard commands for invoking Java. _RUNJAVA=$JAVA_HOME/bin/java _RUNJDB=$JAVA_HOME/bin/jdb ### Set up defaults if they were omitted in TOMCAT_CFG ### JVM lookup if [ -z $JAVA_HOME ]; then # Search for java in PATH JAVA=`which java` if [ -z $JAVA ] ; then JAVA_BINDIR=`dirname ${JAVA}` JAVA_HOME=${JAVA_BINDIR}/.. fi # Default clean JAVA_HOME [ -z $JAVA_HOME -a -d /usr/lib/java ] JAVA_HOME=/usr/lib/java # Default IBM JAVA_HOME [ -z $JAVA_HOME -a -d /opt/IBMJava2-13 ] JAVA_HOME=/opt/IBMJava2-13 # Another solution [ -z $JAVA_HOME -a -d /usr/java/jdk ] JAVA_HOME=/usr/java/jdk # madeinlinux JAVA_HOME [ -z $JAVA_HOME -a -d /usr/local/jdk1.2.2 ] JAVA_HOME=/usr/local/jdk1.2.2 # Kondara JAVA_HOME [ -z $JAVA_HOME -a -d /usr/lib/java/jdk1.2.2 ] JAVA_HOME=/usr/lib/java/jdk1.2.2 # Other commonly found JAVA_HOMEs [ -z $JAVA_HOME -a -d /usr/jdk1.2 ] JAVA_HOME=/usr/jdk1.2 # Default Caldera JAVA_HOME [ -z $JAVA_HOME -a -d /opt/java-1.3 ] JAVA_HOME=/opt/java-1.3 # Add other locations here if [ -z $JAVA_HOME ]; then echo No JAVA_HOME specified in ${TOMCAT_CFG} and no java found, exiting... exit 1 else echo Found JAVA_HOME: ${JAVA_HOME} echo Please complete your ${TOMCAT_CFG} so we won't have to look for it next time fi fi # Set standard CLASSPATH CLASSPATH=$JAVA_HOME/lib/tools.jar # Add on extra jar files to CLASSPATH if [ -n $JSSE_HOME ]; then CLASSPATH=$CLASSPATH:$JSSE_HOME/lib/jcert.jar:$JSSE_HOME/lib/jnet.jar:$JSSE_HOME/lib/jsse.jar fi CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/bootstrap.jar if [ -z $CATALINA_BASE ] ; then CATALINA_BASE=$CATALINA_HOME fi if [ -z $CATALINA_TMPDIR ] ; then # Define the
RE: Idea for dtomcat4 script/conf in webapp.rpm
Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. It's something which should be even added to tomcat4 original script. I'm +1 with it. BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. That's why we works today so closely with ant developpers to merge the ant original script and the one we're using in rpms (jakarta rpms or jpackage project rpms) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
GOMEZ Henri wrote: Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. It's something which should be even added to tomcat4 original script. I'm +1 with it. BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. That's why we works today so closely with ant developpers to merge the ant original script and the one we're using in rpms (jakarta rpms or jpackage project rpms) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Idea for dtomcat4 script/conf in webapp.rpm
BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. dtomcat is just the rpm renaming of original catalina.sh... I think that patch could be usefull, you should get the latest tomcat 4.0.4 from cvs, and apply the same patch to catalina.sh. # CATALINA_LOG(Optional) Provides alternate output locations for StandardOut # and StandardErr ... ... if [ -z $CATALINA_BASE ] ; then CATALINA_BASE=$CATALINA_HOME fi if [ -z $CATALINA_TMPDIR ] ; then # Define the java.io.tmpdir to use for Catalina CATALINA_TMPDIR=$CATALINA_BASE/temp fi if [ -z $CATALINA_LOG ] ; then # Set it to a default CATALINA_LOG=$CATALINA_BASE/logs/catalina.out fi # - Execute The Requested Command - echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR echo Using CATALINA_LOG:$CATALINA_LOG echo Using JAVA_HOME: $JAVA_HOME ... ... elif [ $1 = start ] ; then shift touch $CATALINA_LOG if [ $1 = -security ] ; then echo Using Security Manager shift $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Djava.security.manager \ -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_LOG 21 else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_LOG 21 fi a big +1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
Think I did this right, didn't I? (I diff'ed my changes against tomcat_404_b2 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh) The patchfile is attached: -Mark Mark Diggory wrote: Which Tag is for 4.0.4 ? (tomcat_404_b2_01 or tomcat_404_b2) or do I want to do it against 4.1 (HEAD) -Mark GOMEZ Henri wrote: BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. dtomcat is just the rpm renaming of original catalina.sh... Index: catalina.sh === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v retrieving revision 1.20.2.3 diff -u -r1.20.2.3 catalina.sh --- catalina.sh 19 Mar 2002 18:24:36 - 1.20.2.3 +++ catalina.sh 30 Apr 2002 17:39:06 - @@ -17,6 +17,9 @@ # the JVM should use (java.io.tmpdir). Defaults to # $CATALINA_BASE/temp. # +# CATALINA_LOG(Optional) Provides alternate output locations for StandardOut +# and StandardErr +# # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the start, @@ -94,6 +97,11 @@ CATALINA_TMPDIR=$CATALINA_BASE/temp fi +if [ -z $CATALINA_LOG ] ; then + # Define the default location for StandardErr and StandardOut to use for Catalina +CATALINA_LOG=$CATALINA_BASE/logs/catalina.out +fi + # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --path --windows $JAVA_HOME` @@ -107,6 +115,7 @@ echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR +echo Using CATALINA_LOG:$CATALINA_LOG echo Using JAVA_HOME: $JAVA_HOME if [ $1 = jpda ] ; then @@ -197,7 +206,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ @@ -205,7 +214,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 fi elif [ $1 = stop ] ; then -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]