Strabon

changeset 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 e9ded8878b78
children 05b7ddbd273e
files scripts/redeploy
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/redeploy	Fri Jun 08 15:33:54 2012 +0300
     1.3 @@ -0,0 +1,20 @@
     1.4 +#! /bin/bash
     1.5 +
     1.6 +echo "This script must be executed in Strabon folder"
     1.7 +
     1.8 +while getopts po option
     1.9 +do
    1.10 +	case "$option" in
    1.11 +		o)	echo "offline"; offline="-o";;
    1.12 +		p)	echo "package"; package="true";;
    1.13 +	esac
    1.14 +done
    1.15 +
    1.16 +if [ "$package" == "true" ]; then
    1.17 +	mvn $offline clean package
    1.18 +fi
    1.19 +
    1.20 +sudo cp endpoint/target/strabon-endpoint-*.war /var/lib/tomcat6/webapps/endpoint.war  &&
    1.21 +
    1.22 +sudo service postgresql restart &&
    1.23 +sudo service tomcat6 restart