From 8bd4577ece8f9516680bc904737452776b85442b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A3=B4=E6=B5=A9=E5=AE=87?= Date: Sun, 21 Jan 2024 17:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=83=A8=E7=BD=B2=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/service-腾讯云-home.bat | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 script/service-腾讯云-home.bat diff --git a/script/service-腾讯云-home.bat b/script/service-腾讯云-home.bat new file mode 100644 index 0000000..568b5ef --- /dev/null +++ b/script/service-腾讯云-home.bat @@ -0,0 +1,34 @@ +@echo off + +set codepath=D:\phy\1.pnkx\pnkx-admin +set serverip=120.53.247.15 +set serveruser=root +set userpwd=phy0316. +set uploadpath=/app/ + +D: +cd "%codepath%" + +echo maven clean start... +"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\phy\1.pnkx\pnkx-admin -Djansi.passthrough=true -Dmaven.home=E:\maven\apache-maven-3.5.3 -Dclassworlds.conf=E:\maven\apache-maven-3.5.3\bin\m2.conf "-Dmaven.ext.class.path=D:\work\IntelliJ IDEA 2023.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\work\IntelliJ IDEA 2023.2.1\lib\idea_rt.jar=65344:D:\work\IntelliJ IDEA 2023.2.1\bin" -Dfile.encoding=UTF-8 -classpath E:\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2023.2.1 -s E:\maven\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=E:\maven\repository clean + +echo maven package start... +"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\phy\1.pnkx\pnkx-admin -Djansi.passthrough=true -Dmaven.home=E:\maven\apache-maven-3.5.3 -Dclassworlds.conf=E:\maven\apache-maven-3.5.3\bin\m2.conf "-Dmaven.ext.class.path=D:\work\IntelliJ IDEA 2023.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\work\IntelliJ IDEA 2023.2.1\lib\idea_rt.jar=65360:D:\work\IntelliJ IDEA 2023.2.1\bin" -Dfile.encoding=UTF-8 -classpath E:\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2023.2.1 -s E:\maven\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=E:\maven\repository package +echo maven package finished! + + +echo upload start... +pscp -l %serveruser% -pw "%userpwd%" "%codepath%\pnkx-admin\target\pnkx-admin.jar" %serveruser%@%serverip%:%uploadpath% +echo upload finished! + + +echo update start... +set sshFile=%codepath%\TempSSH.txt +>"%sshFile%" ( + echo,cd %uploadpath% + echo,sh start.sh restart +) +echo %serverip% update start... +plink -ssh %serveruser%@%serverip% -pw %userpwd% -m %sshFile% -no-antispoof +echo update finished! +pause