Strabon

annotate scripts/redeploy @ 264:b46fde34ad71

A script for easily redeploying endpoint
author George Garbis <ggarbis@di.uoa.gr>
date Fri Jun 08 15:33:54 2012 +0300 (2012-06-08)
parents
children eebc02275912
rev   line source
ggarbis@264 1 #! /bin/bash
ggarbis@264 2
ggarbis@264 3 echo "This script must be executed in Strabon folder"
ggarbis@264 4
ggarbis@264 5 while getopts po option
ggarbis@264 6 do
ggarbis@264 7 case "$option" in
ggarbis@264 8 o) echo "offline"; offline="-o";;
ggarbis@264 9 p) echo "package"; package="true";;
ggarbis@264 10 esac
ggarbis@264 11 done
ggarbis@264 12
ggarbis@264 13 if [ "$package" == "true" ]; then
ggarbis@264 14 mvn $offline clean package
ggarbis@264 15 fi
ggarbis@264 16
ggarbis@264 17 sudo cp endpoint/target/strabon-endpoint-*.war /var/lib/tomcat6/webapps/endpoint.war &&
ggarbis@264 18
ggarbis@264 19 sudo service postgresql restart &&
ggarbis@264 20 sudo service tomcat6 restart