Blame | Last modification | View Log | RSS feed
#!/bin/bash# Deploy the war#sh $TOMCAT_HOME/bin/shutdown.shpkill -9 -f tomcatecho "deleting old Dtr.war Dtr directory";`rm -rf $TOMCAT_HOME/webapps/Dtr*`;if [ $? -eq 0 ]; thenecho "Dtr.war and Dtr directory has been removed successfully.";echo "Dtr.war is deploying... to tomcat container";cp target/Dtr-1.0-SNAPSHOT.war $TOMCAT_HOME/webapps/Dtr.warif [ $? -eq 0 ]; thenecho "Dtr.war has been deployed successfully.";echo "freshing the catalina.out file";>$TOMCAT_HOME/logs/catalina.out;if [ $? -eq 0 ]; thenecho "catalina.out has been refreshed.";fiecho "tomcat container is being starting...";sh $TOMCAT_HOME/bin/startup.shif [ $? -eq 0 ]; thenecho "tomcat container has been started successfully.";echo "opening application logs";#tail -f /home/ashikali/apache-tomcat-8.0.43/logs/catalina.outtail -f $TOMCAT_HOME/logs/catalina.outelseecho "tomcat container is failed to start";fielseecho "Dtr.war deployment failed.";fielseecho "Dtr.war or Dtr directory deletion failed.";fi