Harden Windows service supervision
This commit is contained in:
@@ -5,9 +5,11 @@ cd /d "%~dp0"
|
||||
|
||||
set "LOG_DIR=%~dp0logs"
|
||||
set "LOG_FILE=%LOG_DIR%\autostart.log"
|
||||
set "DOCUTRANSLATE_NONINTERACTIVE=1"
|
||||
|
||||
if not exist "%LOG_DIR%" mkdir "%LOG_DIR%"
|
||||
|
||||
:restart
|
||||
echo.>> "%LOG_FILE%"
|
||||
echo [%DATE% %TIME%] Starting DocuTranslate autostart runner...>> "%LOG_FILE%"
|
||||
|
||||
@@ -15,5 +17,7 @@ call "%~dp0run.bat" >> "%LOG_FILE%" 2>&1
|
||||
|
||||
set "EXIT_CODE=%ERRORLEVEL%"
|
||||
echo [%DATE% %TIME%] DocuTranslate stopped with exit code %EXIT_CODE%.>> "%LOG_FILE%"
|
||||
echo [%DATE% %TIME%] Restarting in 10 seconds...>> "%LOG_FILE%"
|
||||
|
||||
exit /b %EXIT_CODE%
|
||||
timeout /t 10 /nobreak >nul
|
||||
goto restart
|
||||
|
||||
Reference in New Issue
Block a user