Deploy the project to the test host without network access on the intranet

Case background, a test server, intranet, no network,

All we need to do is to package the jar ourselves, upload the file to the server, and start the jar

The implementation process is relatively cumbersome and time-consuming, so the following script appeared

Set WshShell=WScript.CreateObject("WScript.Shell") 
WshShell.Run "cmd.exe"
WScript.Sleep 1500 
WshShell.SendKeys "scp target\app.jar [email protected]:/home/services"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500 
WshShell.SendKeys "123456"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500 
WshShell.SendKeys "ssh [email protected] ""/home/services/start.sh restart"""
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500 
WshShell.SendKeys "123456"
WshShell.SendKeys "{ENTER}"

Guess you like

Origin blog.csdn.net/u013833472/article/details/131955001