Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Windows liveness for nested if statements #680

Merged
merged 13 commits into from
Nov 17, 2023
6 changes: 3 additions & 3 deletions otelcollector/build/windows/scripts/livenessprobe.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set /a durationInMinutes = -1
if "%MAC%" == "" (
rem Non-MAC mode
tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "Metrics Extension is not running (Non-MAC mode)"
exit /B 1
)
Expand All @@ -38,12 +38,12 @@ if "%MAC%" == "" (
)
) else (
tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "Metrics Extension is not running (configuration exists)"
exit /B 1
)
tasklist /fi "imagename eq MonAgentLauncher.exe" /fo "table" | findstr MonAgentLauncher > nul
if %ERRORLEVEL% NEQ 0 (
if !ERRORLEVEL! NEQ 0 (
echo "MonAgentLauncher is not running (configuration exists)"
exit /B 1
)
Expand Down
Loading