Skip to content

Instantly share code, notes, and snippets.

@identityclash
Forked from genediazjr/deploy.sh
Created November 11, 2015 06:08
Show Gist options
  • Save identityclash/edc6fc6657169f3288ab to your computer and use it in GitHub Desktop.
Save identityclash/edc6fc6657169f3288ab 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