Skip to content

Instantly share code, notes, and snippets.

@genediazjr
Last active December 31, 2015 16:29
Show Gist options
  • Save genediazjr/8014338 to your computer and use it in GitHub Desktop.
Save genediazjr/8014338 to your computer and use it in GitHub Desktop.
Tomcat deployment script on Debian EC2
#!/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