-
-
Save rasefon/d295e2b809676710f1f6bb846e65959b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:tomcat6] | |
command=/opt/tomcat6-instance/bin/supervisor-wrapper.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: http://serverfault.com/questions/425132/controlling-tomcat-with-supervisor | |
function shutdown() | |
{ | |
date | |
echo "Shutting down Tomcat" | |
unset CATALINA_PID # Necessary in some cases | |
$CATALINA_HOME/bin/catalina.sh stop | |
} | |
date | |
echo "Starting Tomcat" | |
export JAVA_HOME="/usr/lib/jvm/java-7-oracle" | |
export CATALINA_HOME="/usr/share/tomcat6" | |
export CATALINA_BASE="/opt/tomcat6-instance" | |
export CATALINA_PID=/tmp/$$ | |
. $CATALINA_HOME/bin/catalina.sh start | |
# Allow any signal which would kill a process to stop Tomcat | |
trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP | |
echo "Waiting for `cat $CATALINA_PID`" | |
wait `cat $CATALINA_PID` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[inet_http_server] | |
port = 127.0.0.1:9001 | |
username = user | |
password = 123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment