2018年3月2日 | Leave a comment 问题: 解决: #!/bin/bash # 构建打包上传 并重启 # /home/wms/start.sh begin ##!/bin/bash #cd `dirname $0` #nohup java -jar wms.war >> wms.log 2>&1 & # start.sh end # mvn clean -DskipTests=true install package scp -i ../docs/dev1 target/wms.war root@122.152.200.229:/root/ pid=`ssh -i ../docs/dev1 root@122.152.200.229 ps aux |grep java|grep -i wms|awk '{print $2}'` echo $pid ssh -i ../docs/dev1 root@122.152.200.229 kill $pid ssh -i ../docs/dev1 root@122.152.200.229 cp /root/wms.war /home/wms/ ssh -i ../docs/dev1 root@122.152.200.229 /home/wms/start.sh 1234567891011121314151617 #!/bin/bash# 构建打包上传 并重启 # /home/wms/start.sh begin##!/bin/bash#cd `dirname $0`#nohup java -jar wms.war >> wms.log 2>&1 &# start.sh end #mvn clean -DskipTests=true install packagescp -i ../docs/dev1 target/wms.war root@122.152.200.229:/root/pid=`ssh -i ../docs/dev1 root@122.152.200.229 ps aux |grep java|grep -i wms|awk '{print $2}'`echo $pidssh -i ../docs/dev1 root@122.152.200.229 kill $pidssh -i ../docs/dev1 root@122.152.200.229 cp /root/wms.war /home/wms/ssh -i ../docs/dev1 root@122.152.200.229 /home/wms/start.sh