From: rjung Date: Mon, 20 Jun 2011 12:37:01 +0000 (+0000) Subject: Slight improvement of configtest handling in X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d218b173d7665d657b859d1e0c18819256979db0;p=tomcat7.0 Slight improvement of configtest handling in Unix shell script: - add to usage - don't use CATALINA_OPTS (think memory size etc.) - log a message if status != 0 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1137607 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/bin/catalina.sh b/bin/catalina.sh index 03ec671e5..9d069b024 100755 --- a/bin/catalina.sh +++ b/bin/catalina.sh @@ -482,13 +482,17 @@ elif [ "$1" = "stop" ] ; then elif [ "$1" = "configtest" ] ; then - eval \"$_RUNJAVA\" $JAVA_OPTS $CATALINA_OPTS \ + eval \"$_RUNJAVA\" $JAVA_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 configtest - exit $? + result=$? + if [ $result -ne 0 ]; then + echo "Configuration error detected!" + fi + exit $result elif [ "$1" = "version" ] ; then @@ -516,6 +520,7 @@ else echo " stop n Stop Catalina, waiting up to n seconds for the process to end" echo " stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running" echo " stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running" + echo " configtest Run a basic syntax check on server.xml - check exit code for result" echo " version What version of tomcat are you running?" echo "Note: Waiting for the process to end and use of the -force option require that \$CATALINA_PID is defined" exit 1