Script d'init Tomcat

Contenu

#!/bin/sh
. /etc/init.d/functions

RETVAL=$?
PATH=/usr/local/java/jdk1.6.0_15/bin:$PATH
JAVA_HOME=/usr/local/java/jdk1.6.0_15
JDK_HOME=/usr/local/java/jdk1.6.0_15
CATALINA_HOME=/usr/local/apache-tomcat-6.0.26
export CATALINA_HOME
export PATH
export JAVA_HOME
export JDK_HOME

case "$1" in
 start)
        if [ -f $CATALINA_HOME/bin/startup.sh ];
          then
	    echo $"Starting Tomcat"
            /bin/su tomcat $CATALINA_HOME/bin/startup.sh
        fi
	;;
 stop)
        if [ -f $CATALINA_HOME/bin/shutdown.sh ];
          then
	    echo $"Stopping Tomcat"
            /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
        fi
 	;;
 *)
 	echo $"Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit $RETVAL

Pascal
Tips   init   tomcat  

comments powered by Disqus