linux脚本批量启动jar包,linux脚本:批量上传下载jar包

@echo off

::download

:: Run SFXCL - downlaod .jar files from remote to local folder:

echo.Prepare to download the jar package from sit,please wait.....

sfxcl /S "10.202.107.24_TW_后端" /app/runtime/lib/*.jar E:\JarPackage\ >nul 2>&1

::check the download status.

if %errorlevel% == 0 (goto SUCCESS) else (goto FAILURE)

:SUCCESS

echo.the jar package downloaded successfully.

::set /p upload=Do you want to continue upload,please choose Y or N:

set upload=Y

if NOT %upload%==Y (goto END) else (goto UPLOAD)

:FAILURE

echo.Transfer Failure.

goto END

:UPLOAD

::Check if the server directory exists

if not exist E:\JarPackage\196.168.1.211\ md E:\JarPackage\196.168.1.211\ >nul 2>&1

if not exist E:\JarPackage\196.168.1.212\ md E:\JarPackage\196.168.1.212\ >nul 2>&1

if not exist E:\JarPackage\196.168.1.213\ md E:\JarPackage\196.168.1.213\ >nul 2>&1

if not exist E:\JarPackage\196.168.1.214\ md E:\JarPackage\196.168.1.214\ >nul 2>&1

if not exist E:\JarPackage\196.168.1.215\ md E:\JarPackage\196.168.1.215\ >nul 2>&1

if not exist E:\JarPackage\196.168.1.216\ md E:\JarPackage\196.168.1.216\ >nul 2>&1

::Copy the packages to their respective directories

echo.The files is being copied,please wait.....

for %%i in (

aff-cache-1.0-SNAPSHOT.jar

aff-convert-1.0-SNAPSHOT.jar

aff-eureka-1.0-SNAPSHOT.jar

aff-invoice-1.0-SNAPSHOT.jar

aff-system-1.0-SNAPSHOT.jar) do (

copy /y %%i E:\JarPackage\196.168.1.211\ >nul 2>&1

copy /y %%i E:\JarPackage\196.168.1.212\ >nul 2>&1)

for %%i in (

aff-config-1.0-SNAPSHOT.jar

aff-difference-1.0-SNAPSHOT.jar

aff-gather-1.0-SNAPSHOT.jar

aff-handAdjustment-1.0-SNAPSHOT.jar

aff-incomeAndPayment-1.0-SNAPSHOT.jar ) do (

copy /y %%i E:\JarPackage\196.168.1.213\ >nul 2>&1

copy /y %%i E:\JarPackage\196.168.1.214\ >nul 2>&1)

for %%i in (

aff-basicdata-1.0-SNAPSHOT.jar

aff-pull-1.0-SNAPSHOT.jar

aff-report-1.0-SNAPSHOT.jar

aff-tally-1.0-SNAPSHOT.jar

aff-webservice-1.0-SNAPSHOT.jar

aff-zuul-1.0-SNAPSHOT.jar ) do (

copy /y %%i E:\JarPackage\196.168.1.215\ >nul 2>&1

copy /y %%i E:\JarPackage\196.168.1.216\ >nul 2>&1)

echo.the files copy is completed.

pause

echo.Prepare to upload the jar package to the UAT,please wait.....

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.211\*.jar /S "196.168.1.211" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.211 successful.) else (

echo.The jar package upload to server 196.168.1.211 failure.)

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.212\*.jar /S "196.168.1.212" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.212 successful.) else (

echo.The jar package upload to server 196.168.1.212 failure.)

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.213\*.jar /S "196.168.1.213" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.213 successful.) else (

echo.The jar package upload to server 196.168.1.213 failure.)

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.214\*.jar /S "196.168.1.214" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.214 successful.) else (

echo.The jar package upload to server 196.168.1.214 failure.)

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.215\*.jar /S "196.168.1.215" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.215 successful.) else (

echo.The jar package upload to server 196.168.1.215 failure.)

:: Run SFXCL - upload .jar files from local to remote folder:

sfxcl E:\JarPackage\196.168.1.216\*.jar /S "196.168.1.216" /home/sfapp/ >nul 2>&1

::check the jar package upload status.

if %errorlevel% == 0 (

echo.The jar package upload to server 196.168.1.216 successful.) else (

echo.The jar package upload to server 196.168.1.216 failure.)

:END

echo.Press any key to exit this script execute.

pause>nul

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值