usr/src/cmd/tomcat/Solaris/http-tomcat6
changeset 2 8f1801a322e9
parent 0 b34509ac961f
child 7 f96733ecc878
equal deleted inserted replaced
1:37d545eabfea 2:8f1801a322e9
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 #
    22 #
    23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
    23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
    24 # Use is subject to license terms.
    24 # Use is subject to license terms.
    25 #
    25 #
    26 #ident	"@(#)http-tomcat6	1.1	08/12/16 SMI"
    26 #ident	"@(#)http-tomcat6	1.2	09/10/30 SMI"
    27 #
    27 #
    28 
    28 
    29 . /lib/svc/share/smf_include.sh
    29 . /lib/svc/share/smf_include.sh
    30 
    30 
    31 case "$1" in
    31 case "$1" in
    42 	;;
    42 	;;
    43 esac
    43 esac
    44 
    44 
    45 CATALINA_HOME=/usr/tomcat6
    45 CATALINA_HOME=/usr/tomcat6
    46 CATALINA_BASE=/var/tomcat6
    46 CATALINA_BASE=/var/tomcat6
       
    47 CATALINA_PID=$CATALINA_BASE/logs/pid
    47 JAVA_HOME=/usr/java
    48 JAVA_HOME=/usr/java
    48 export CATALINA_HOME CATALINA_BASE JAVA_HOME
    49 rm -f $CATALINA_PID
       
    50 export CATALINA_HOME CATALINA_BASE CATALINA_PID JAVA_HOME
    49 $CATALINA_HOME/bin/catalina.sh $cmd 2>&1
    51 $CATALINA_HOME/bin/catalina.sh $cmd 2>&1
    50 
    52 
    51 if [ $? -ne 0 ]; then
    53 if [ $? -ne 0 ]; then
    52     echo "Tomcat failed to start. Check the log (defaults to $CATALINA_BASE/logs/catalina.out) for more information, if any."
    54     echo "Tomcat failed to start. Check the log (defaults to $CATALINA_BASE/logs/catalina.out) for more information, if any."
    53     exit $SMF_EXIT_ERR_FATAL
    55     exit $SMF_EXIT_ERR_FATAL