Skip to content

Commit

Permalink
midpoint.bat: added setenv reading for stop command (e.g. stop.bat)
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Mar 29, 2022
1 parent 85e56e6 commit 5792e46
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dist/src/main/bin/midpoint.bat
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ goto end

:doStop

if not exist "%BIN_DIR%setenv.bat" goto :noSetEnvStop
echo Applying %BIN_DIR%setenv.bat
echo.

call "%BIN_DIR%setenv.bat"

:noSetEnvStop

if not exist "%MIDPOINT_HOME%\setenv.bat" goto :noSetEnvMpHomeStop
echo Applying %MIDPOINT_HOME%\setenv.bat
echo.

call "%MIDPOINT_HOME%\setenv.bat"

:noSetEnvMpHomeStop

echo Trying to find and stop a process listening on port %MIDPOINT_PORT%...
set MIDPOINT_FOUND=
FOR /F "usebackq tokens=5" %%i IN (`netstat -aon ^| findstr "0.0.0.0:%MIDPOINT_PORT% "`) DO (
Expand Down

0 comments on commit 5792e46

Please sign in to comment.