optimal bat 脚本

This commit is contained in:
bwcx_jzy 2022-12-16 20:33:19 +08:00
parent 9a8156f19d
commit 52a7a7f7b0
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
3 changed files with 32 additions and 26 deletions

View File

@ -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

View File

@ -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

View File

@ -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