私は、websphere への耳の展開を自動化し、アプリで変数を作成するスクリプトを作成しています。
私の問題は、manageprofiles と startserver のバット ファイルがバッチを終了し、次のステップに進むために複数回呼び出す必要があることです。
これが私のスクリプトです
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 を起動するためのアイデアや代替手段はありますか?