/datos/tomcat/bin/startup.sh
#!/bin/bash
#
# Startup script for the Tomcat Servlet Engine
#
# chkconfig: 2345 64 36
# description: Starts and Stops the Tomcat Servlet Engine.
# processname: tomcat
# Source function library.
. /etc/init.d/functions
#export JAVA_HOME=/usr/java/default
#export JRE_HOME=/usr/java/default/jre
case $1 in
start)
echo $" "
echo $"Iniciando Tomcat"
echo $" "
su -c "/datos/tomcat/bin/catalina.sh $1"
;;
stop)
echo $" "
echo $"Detetiendo Tomcat"
echo $" "
su -c "/datos/tomcat/bin/catalina.sh $1"
;;
restart)
echo $" "
echo $"Reiniciando Tomcat"
echo $" "
su -c "/datos/tomcat/bin/catalina.sh stop"
sleep 10
su -c "/datos/tomcat/bin/catalina.sh start"
;;
status)
echo $" "
echo $"Consultando Tomcat"
echo $" "
INSTANCES=`ps aux | grep java|grep tomcat|wc -l`
if [ $INSTANCES -eq 0 ]; then
echo Tomcat is stopped
RETVAL=3
else
if [ $INSTANCES -eq 1 ]; then
echo Tomcat is running 1 instance…
else
echo Tomcat is running $INSTANCES instances…
fi
RETVAL=0
fi
;;
*)
echo "Usage: /etc/init.d/tomcat start|stop|restart|status"
;;
esac
exit 0
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.