[jbossweb-commits] JBossWeb SVN: r252 - trunk/bin.

jbossweb-commits at lists.jboss.org jbossweb-commits at lists.jboss.org
Fri Aug 31 13:18:17 EDT 2007


Author: remy.maucherat at jboss.com
Date: 2007-08-31 13:18:17 -0400 (Fri, 31 Aug 2007)
New Revision: 252

Modified:
   trunk/bin/catalina.sh
   trunk/bin/service.bat
Log:
- Port script changes.

Modified: trunk/bin/catalina.sh
===================================================================
--- trunk/bin/catalina.sh	2007-08-31 17:16:43 UTC (rev 251)
+++ trunk/bin/catalina.sh	2007-08-31 17:18:17 UTC (rev 252)
@@ -1,4 +1,20 @@
 #!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 # -----------------------------------------------------------------------------
 # Start/Stop Script for the CATALINA Server
 #
@@ -11,7 +27,7 @@
 #                   the same directory that CATALINA_HOME points to.
 #
 #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#                   "stop", or "run" command is executed.
+#                   or "run" command is executed.
 #
 #   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir).  Defaults to
@@ -51,7 +67,7 @@
 #   CATALINA_PID    (Optional) Path of the file which should contains the pid
 #                   of catalina startup java process, when start (fork) is used
 #
-# $Id: catalina.sh 522797 2007-03-27 07:10:29Z fhanik $
+# $Id: catalina.sh 568359 2007-08-22 01:26:43Z funkman $
 # -----------------------------------------------------------------------------
 
 # OS specific support.  $var _must_ be set to either true or false.
@@ -132,7 +148,7 @@
 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:"$CATALINA_HOME"/bin/commons-logging-api.jar
+CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar
 
 if [ -z "$CATALINA_BASE" ] ; then
   CATALINA_BASE="$CATALINA_HOME"
@@ -292,7 +308,7 @@
     FORCE=1
   fi
 
-  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+  "$_RUNJAVA" $JAVA_OPTS \
     -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
     -Dcatalina.base="$CATALINA_BASE" \
     -Dcatalina.home="$CATALINA_HOME" \

Modified: trunk/bin/service.bat
===================================================================
--- trunk/bin/service.bat	2007-08-31 17:16:43 UTC (rev 251)
+++ trunk/bin/service.bat	2007-08-31 17:18:17 UTC (rev 252)
@@ -1,60 +1,60 @@
 @echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
 if "%OS%" == "Windows_NT" setlocal
 rem ---------------------------------------------------------------------------
 rem NT Service Install/Uninstall script
 rem
 rem Options
-rem install                Install the service using Tomcat5 as service name.
+rem install                Install the service using Tomcat6 as service name.
 rem                        Service is installed using default settings.
 rem remove                 Remove the service from the System.
 rem
 rem name        (optional) If the second argument is present it is considered
 rem                        to be new service name                                           
 rem
-rem $Id: service.bat 541206 2007-05-24 06:56:59Z mturk $
+rem $Id: service.bat 571526 2007-08-31 17:17:29Z remm $
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
-
-rem Make sure prerequisite environment variables are set
-if not "%JAVA_HOME%" == "" goto okJavaHome
-echo The JAVA_HOME environment variable is not defined
-echo This environment variable is needed to run this program
-goto end 
-
-:okJavaHome
-
-rem Detect Java Version and CPU
-set JVM_PLATFORM=%PROCESSOR_ARCHITEW6432%
-if "%JVM_PLATFORM%" == "" set JVM_PLATFORM=%PROCESSOR_ARCHITECTURE%
-
-set EXECUTABLE_CPU=
-java -version 2>&1 | findstr /I 64-bit > NUL
-if not ERRORLEVEL == 1 set EXECUTABLE_CPU=%JVM_PLATFORM%\
-
 set CURRENT_DIR=%cd%
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CURRENT_DIR=.\
-if "%OS%" == "Windows_NT" set CURRENT_DIR=%~dp0%
-
-pushd %CURRENT_DIR%..
-set CATALINA_HOME=%CD%
-popd
-
+set CATALINA_HOME=%cd%
+if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome
+rem CD to the upper dir
+cd ..
+set CATALINA_HOME=%cd%
 :gotHome
-if exist "%CATALINA_HOME%\bin\%EXECUTABLE_CPU%tomcat6.exe" goto okHome
-echo Tomcat6.exe for %JVM_PLATFORM% was not found...
+if exist "%CATALINA_HOME%\bin\tomcat6.exe" goto okHome
+echo The tomcat.exe was not found...
 echo The CATALINA_HOME environment variable is not defined correctly.
 echo This environment variable is needed to run this program
 goto end
-
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto okHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end 
 :okHome
 if not "%CATALINA_BASE%" == "" goto gotBase
 set CATALINA_BASE=%CATALINA_HOME%
 :gotBase
+ 
+set EXECUTABLE=%CATALINA_HOME%\bin\tomcat6.exe
 
-set EXECUTABLE=%CATALINA_HOME%\bin\%EXECUTABLE_CPU%tomcat6.exe
-
 rem Set default Service name
 set SERVICE_NAME=Tomcat6
 set PR_DISPLAYNAME=Apache Tomcat
@@ -76,20 +76,20 @@
 :doRemove
 rem Remove the service
 "%EXECUTABLE%" //DS//%SERVICE_NAME%
-echo Service '%SERVICE_NAME%' has been removed
+echo The service '%SERVICE_NAME%' has been removed
 goto end
 
 :doInstall
 rem Install the service
-echo Installing service '%SERVICE_NAME%' ...
-echo Using CATALINA_HOME: %CATALINA_HOME%
-echo Using CATALINA_BASE: %CATALINA_BASE%
-echo Using JAVA_HOME    : %JAVA_HOME%
+echo Installing the service '%SERVICE_NAME%' ...
+echo Using CATALINA_HOME:    %CATALINA_HOME%
+echo Using CATALINA_BASE:    %CATALINA_BASE%
+echo Using JAVA_HOME:        %JAVA_HOME%
 
 rem Use the environment variables as an example
 rem Each command line option is prefixed with PR_
 
-set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat
+set PR_DESCRIPTION=Apache Tomcat Server - http://tomcat.apache.org/
 set PR_INSTALL=%EXECUTABLE%
 set PR_LOGPATH=%CATALINA_BASE%\logs
 set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
@@ -101,8 +101,7 @@
 if exist "%PR_JVM%" goto foundJvm
 set PR_JVM=auto
 :foundJvm
-echo Using JVM          : %PR_JVM%
-echo Using JVM_PLATFORM : %JVM_PLATFORM%
+echo Using JVM:              %PR_JVM%
 "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
@@ -122,7 +121,7 @@
 set PR_STDOUTPUT=auto
 set PR_STDERROR=auto
 "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256
-echo Service '%SERVICE_NAME%' has been installed.
+echo The service '%SERVICE_NAME%' has been installed.
 
 :end
 cd %CURRENT_DIR%




More information about the jbossweb-commits mailing list