イントラネット上のネットワーク アクセスを使用せずにプロジェクトをテスト ホストにデプロイします。

ケースの背景、テスト サーバー、イントラネット、ネットワークなし、

私たちがする必要があるのは、jar を自分でパッケージ化し、ファイルをサーバーにアップロードして、jar を起動することだけです

実装プロセスは比較的面倒で時間がかかるため、次のスクリプトが登場しました

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}"

おすすめ

転載: blog.csdn.net/u013833472/article/details/131955001