Blame | Last modification | View Log | RSS feed
#!/bin/bash# Deploy the war#sh $TOMCAT_HOME/bin/shutdown.shpkill -9 -f tomcatecho "deleting old profitmandi-web.war profitmandi-web directory";echo "deleting old profitmandi-admin.war profitmandi-admin directory";echo "deleting old profitmandi-fofo.war profitmandi-fofo directory";`rm -rf $TOMCAT_HOME/webapps/profitmandi-web*`;if [ $? -ef 0 ]; thenecho "profitmandi-web.war and profitmandi-web directroy has been removed successfully.";elseecho "profitmandi-web.war and profitmandi-web directroy deletion failed.";fi`rm -rf $TOMCAT_HOME/webapps/profitmandi-admin*`;if [ $? -ef 0 ]; thenecho "profitmandi-admin.war and profitmandi-admin directroy has been removed successfully.";elseecho "profitmandi-admin.war and profitmandi-admin directroy deletion failed.";fi`rm -rf $TOMCAT_HOME/webapps/profitmandi-fofo*`;if [ $? -eq 0 ]; thenecho "profitmandi-fofo.war and profitmandi-fofo directory has been removed successfully.";echo "profitmandi-fofo.war is deploying... to tomcat container";cp target/profitmandi-fofo-0.0.1-SNAPSHOT.war $TOMCAT_HOME/webapps/profitmandi-fofo.warif [ $? -eq 0 ]; thenecho "profitmandi-fofo.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 "profitmandi-fofo.war deployment failed.";fielseecho "profitmandi-fofo.war or profitmandi-fofo directory deletion failed.";fi