Last active
December 31, 2015 16:29
-
-
Save genediazjr/8014338 to your computer and use it in GitHub Desktop.
Tomcat deployment script on Debian EC2
This file contains 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/sh | |
echo "\n Killing the cat..." | |
/etc/init.d/tomcat7 stop | |
echo "\n Removing internal organs..." | |
rm -rf /var/lib/tomcat7/webapps/ROOT | |
rm -rf /var/lib/tomcat7/webapps/ROOT.war | |
echo "\n Placing new organs..." | |
cp /home/admin/$1.war /var/lib/tomcat7/webapps/ROOT.war | |
echo "\n Resurrecting the cat..." | |
/etc/init.d/tomcat7 start | |
echo "\n Open the scrolls..." | |
tail -f -n 100 /var/lib/tomcat7/logs/catalina.out | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment