diff --git a/modules/agent/src/main/bin/Agent.bat b/modules/agent/src/main/bin/Agent.bat index a02e419cc..965b62d12 100644 --- a/modules/agent/src/main/bin/Agent.bat +++ b/modules/agent/src/main/bin/Agent.bat @@ -81,13 +81,15 @@ if "%1"=="" ( echo. [0] exit 0 echo. @REM enter - echo. Please enter the selected serial number: - set /p ID= - IF "!ID!"=="1" call:start - IF "!ID!"=="2" call:status - IF "!ID!"=="3" call:restart - IF "!ID!"=="4" call:stop - IF "!ID!"=="0" EXIT + for /l %%i in (1,1,10000) do ( + echo. Please enter the selected serial number: + set /p ID= + IF "!ID!"=="1" call:start + IF "!ID!"=="2" call:status + IF "!ID!"=="3" call:restart + IF "!ID!"=="4" call:stop + IF "!ID!"=="0" EXIT + ) )else ( if "%1"=="restart" ( call:restart @@ -101,12 +103,13 @@ if "%1"=="" ( call:use ) ) -if "%2" NEQ "upgrade" ( - PAUSE -)else ( - @REM The upgrade ends directly +if "%2" == "upgrade" ( + @REM The upgrade ends directly + EXIT 0 ) -EXIT 0 + +:end +goto:eof @REM start :start diff --git a/modules/server/src/main/bin/BlockListener.sh b/modules/server/src/main/bin/BlockListener.sh index 3009febc0..83eae38b9 100644 --- a/modules/server/src/main/bin/BlockListener.sh +++ b/modules/server/src/main/bin/BlockListener.sh @@ -110,14 +110,14 @@ function check_conf() { check_conf -bash $bin_abs_path/Server.sh start -s +bash "$bin_abs_path/Server.sh" start -s while (true); do if [ -f "$pidfile" ]; then tail_log wait_term_pid "$pidfile" else - echo pidfile not found $pidfile + echo "pidfile not found $pidfile" fi if [ $LOOPS -gt 120 ]; then diff --git a/modules/server/src/main/bin/Server.bat b/modules/server/src/main/bin/Server.bat index a636a5116..8e9d79d92 100644 --- a/modules/server/src/main/bin/Server.bat +++ b/modules/server/src/main/bin/Server.bat @@ -81,13 +81,15 @@ if "%1"=="" ( echo. [0] exit 0 echo. @REM enter - echo. Please enter the selected serial number: - set /p ID= - IF "!ID!"=="1" call:start - IF "!ID!"=="2" call:status - IF "!ID!"=="3" call:restart - IF "!ID!"=="4" call:stop - IF "!ID!"=="0" EXIT + for /l %%i in (1,1,10000) do ( + echo. Please enter the selected serial number: + set /p ID= + IF "!ID!"=="1" call:start + IF "!ID!"=="2" call:status + IF "!ID!"=="3" call:restart + IF "!ID!"=="4" call:stop + IF "!ID!"=="0" EXIT + ) )else ( if "%1"=="restart" ( call:restart @@ -101,12 +103,13 @@ if "%1"=="" ( call:use ) ) -if "%2" NEQ "upgrade" ( - PAUSE -)else ( - @REM The upgrade ends directly +if "%2" == "upgrade" ( + @REM The upgrade ends directly + EXIT 0 ) -EXIT 0 + +:end +goto:eof @REM start :start