我正在编写脚本来自动将耳朵部署到 websphere 并在应用程序上创建变量。
我的问题是 manageprofiles 和 startserver bat 文件退出了我的批处理并进入下一步我必须多次调用它
这是我的脚本
FOR /F "tokens=*" %%i in ('type params.properties') do SET %%i
REM SET PATH=%PATH%;%AppServerPath%\bin
REM CALL setupCmdLine.bat -create -profileName %profile% -profilePath "%AppServerPath%\profiles\%profile%" -templatePath "%AppServerPath%\profileTemplates\default"
"%AppServerPath%\bin\manageprofiles" -listProfiles | findstr -i %profile% > nul:
if %ERRORLEVEL%==1 (
ECHO Creating profile %profile% on %AppServerPath%\profiles\%profile%
"%AppServerPath%\bin\manageprofiles" -create -profileName %profile% -profilePath "%AppServerPath%\profiles\%profile%" -templatePath "%AppServerPath%\profileTemplates\default"
)
ECHO Getting profile path
FOR /F "delims=" %%a IN ('manageprofiles -getPath -profileName %profile%') DO @SET PROFILEPATH=%%a
REM SET PATH=%OLD_PATH%;%PROFILEPATH%\bin
FOR /F "tokens=7 delims= " %%H IN ('serverStatus server1 ^| findstr "Application Server"') DO (
IF /I "%%H" NEQ "STARTED" (
v ECHO Starting server1
startServer server1
)
)
"%PROFILEPATH%\bin\wsadmin" -lang jython -f EEDeployer.jy "%PROFILEPATH%"
检查配置文件并在不存在时创建它然后在其上启动 server1 的任何想法或替代方法?