In case anyone is familiar with the B2B SI Application - there is a stop and start cmd file that runs through a list of checks and either stops or starts services accordingly.
The Stop file works fine no matter how I call it from BigFix - I’ve called it using PS, and just using “run” or “runhidden”, “waithidden” etc etc and the Stop file always works.
The Start file, on the other hand, does nothing. In some of the examples above, BF thinks its completed but nothing happens on the server side.
I’m finding suggestions etc from searching the web, its just that nothing is working in this scenario.
Below is the path and Start script in its entirety - this is NOT a file share btw, but a local drive/path
Thank you in advance…
D:\ibm\si\install\bin\stopWindowsService.cmd
@echo off
REM ########################################################################
REM Licensed Materials - Property of IBM
REM
REM © Copyright IBM Corp. 2007, 2014 All Rights Reserved.
REM
REM US Government Users Restricted Rights - Use, duplication or disclosure
REM restricted by GSA ADP Schedule Contract with IBM Corp.
REM ########################################################################
@echo off
setlocal
set input=noOps
if “%1” EQU “restart” set input=%1
REM Validating JDK of the install
Set MyCurDir=%CD%
Set INSTALL_DIR=D:\IBM\SI\install
set DATETIMESTAMP=%DATE%%TIME%
set DATETIMESTAMP=%DATETIMESTAMP: =%
set DATETIMESTAMP=%DATETIMESTAMP:/=%
set DATETIMESTAMP=%DATETIMESTAMP:,=%
set DATETIMESTAMP=%DATETIMESTAMP:.=%
set DATETIMESTAMP=%DATETIMESTAMP::=%
set LOGSDIR=D:\IBM\SI\install\logs
set LOGSBACKUPDIR=D:\IBM\SI\install\logs\LOGS%DATETIMESTAMP%
set LIBERTY_PORT=16017
set SERVICE_NAME=“IBMSILibertyProfileat%LIBERTY_PORT%”
call %MyCurDir%\tmp.cmd
%JAVA% -classpath D:/IBM/SI/install/jar/bootstrapper.jar;D:/IBM/SI/install/jar/install_foundation.jar;D:/IBM/SI/install/jar/antInstaller/0_8/antinstaller.jar -Dvendor=shell -DvendorFile=D:\IBM\SI\install\properties\servers.properties com.sterlingcommerce.woodstock.noapp.NoAppLoader -f D:\IBM\SI\install\properties\dynamicclasspath.cfg -class com.sterlingcommerce.woodstock.install.antinstaller.validate.JDKValidator -f D:/IBM/SI/install/properties/dynamicclasspath.cfg -invokeargs D:/IBM/SI/install/properties/matrix.properties > D:\IBM\SI\install\logs/noapp.log 2>&1
set codeExit=%errorlevel%
REM echo errorlevel : %errorlevel%
REM echo codeExit : %codeExit%
REM rc is 1 - for validation
REM rc is 0 - for skip validation
if %codeExit% EQU 1 (
echo "!! startWindowsService.cmd ABORTED !!"
echo "!!!"
echo "The JDK Version is not supported. "
echo "Please upgrade your JDK to the supported version as per the documentation."
echo "!!!"
echo "exiting…"
exit /B %rc%
)else (
call %MyCurDir%\updateXercesJars.cmd %INSTALL_DIR%\jdk false
call %MyCurDir%\updateJettyJars.cmd
)
if “%1” EQU “restart” (
call D:\IBM\SI\install\bin\db_exec.cmd "Delete from OPS_NODE_INFO where NODE_NAME is not null"
call D:\IBM\SI\install\bin\db_exec.cmd "Update SCHEDULE set SYSTEMNAME=‘node1’"
call D:\IBM\SI\install\bin\db_exec.cmd “Delete from LOCKS where ITEMNAME is not null and CLEARONSTARTUP > 0”
)
call D:\IBM\SI\install\bin\backUpLogs.cmd %LOGSBACKUPDIR%
call D:\IBM\SI\install\bin\startOpsWindowsService.cmd
call D:\IBM\SI\install\bin\startContainerWindowsService.cmd
REM call D:\IBM\SI\install\bin\startActiveMQWindowsService.cmd
call D:\IBM\SI\install\bin\startContainerWindowsService.cmd
call D:\IBM\SI\install\bin\startASIWindowsService.cmd %input%
REM -------------------------------------------------------------------------
REM at this point the system is up, all services have been started, call any clump specific processing
set LAUNCH_CLA2_SERVER=“false”
set CLA2_REGRESSION_PORT=""
if not exist %LOGSBACKUPDIR% (
md %LOGSBACKUPDIR%
move %LOGSDIR%*.log* %LOGSBACKUPDIR% >NUL
)
if %LAUNCH_CLA2_SERVER% EQU “true” set result=true
if %CLA2_REGRESSION_PORT% NEQ “” set result=true
if “%result%” == “true” (
if exist D:\IBM\SI\install\bin\startCLA2WindowsService.cmd (
echo "Starting CmdLine2 client…"
call D:\IBM\SI\install\bin\startCLA2WindowsService.cmd
)
) else (
echo "CmdLine2 Client is disabled. Not starting CmdLine2 client…"
echo “If you wish to enable starting of the CmdLine2 Client be sure to set or add LAUNCH_CLA2_SERVER=true in sandbox.cfg”
)
if exist D:\IBM\SI\install\bin\startSAPControllerWindowsService.cmd (
call D:\IBM\SI\install\bin\startSAPControllerWindowsService.cmd
)
if exist D:\IBM\SI\install\bin\startWebdavWindowsService.cmd (
call D:\IBM\SI\install\bin\startWebdavWindowsService.cmd
)
REM if exist D:\IBM\SI\install\bin\startEventListenersWindowsService.cmd (
REM call D:\IBM\SI\install\bin\startEventListenersWindowsService.cmd
REM )
if exist D:\IBM\SI\install\bin\startSPEWindowsService.cmd (
call D:\IBM\SI\install\bin\startSPEWindowsService.cmd
)
echo %SERVICE_NAME% service is starting.
if exist D:\IBM\SI\install\bin\startLiberty.cmd (
for /F "tokens=3 delims=: " %%H in ('sc query %SERVICE_NAME% ^| findstr “STATE” ') do (
if /I “%%H” NEQ “RUNNING” (
if /I “%%H” NEQ “START_PENDING” (
sc start %SERVICE_NAME% >nul 2>&1
)
)
)
)
echo %SERVICE_NAME% service started successfully.
if exist D:\IBM\SI\install\properties\supplementalPassphrase.properties (
del D:\IBM\SI\install\properties\supplementalPassphrase.properties > NUL
)