#!/bin/bash cd Labwfcm git pull cd wfcm-api mvn clean package cd target mv wfcm-api.war wfcm-api.war scp wfcm-api.war root@101.201.118.192:/opt ssh -t -t root@101.201.118.192 > /dev/null 2>&1 << eeooff /root/tomcat/tomcat1/bin/shutdown.sh /root/tomcat/tomcat2/bin/shutdown.sh /root/tomcat/tomcat3/bin/shutdown.sh cd /root/tomcat/tomcat1/webapps/ rm -rf * mkdir wfcm-api cd wfcm-api cp /opt/wfcm-api.war ./ jar -xvf wfcm-api.war rm -f wfcm-api.war cd /root/tomcat/tomcat2/webapps/ rm -rf * mkdir wfcm-api cd wfcm-api cp /opt/wfcm-api.war ./ jar -xvf wfcm-api.war rm -f wfcm-api.war cd /root/tomcat/tomcat3/webapps/ rm -rf * mkdir wfcm-api cd wfcm-api cp /opt/wfcm-api.war ./ jar -xvf wfcm-api.war rm -f wfcm-api.war /root/tomcat/tomcat1/bin/startup.sh /root/tomcat/tomcat2/bin/startup.sh /root/tomcat/tomcat3/bin/startup.sh rm -f /opt/wfcm-api.war exit eeooff