Hallo hab einen exile server mit einer Serverrestart.bat
anbei der Code:
Spoiler anzeigen
ECHO off
cls
set gameserver=Arma Exile
title %gameserver% Auto Restart / Process Checker
:start
REM How long until auto restart?
set hours="3"
set minutes="0"
set seconds="0"
REM // Launch parameters
start "Exile" /high "arma3server.exe" -port=2302 "-config=@ExileServer\config.cfg" "-cfg=@ExileServer\basic.cfg" "-profiles=config_exile" -name=Exile "-servermod=@Exileserver;@infiSTAR_Exile;" "-mod=@Exile;@AdvancedTowing;@CBA_A3;@CUP_Terrains_Core;@Extended_Base_Mod;" -malloc=tbbmalloc -autoinit
REM //////// You do not need to update anything else below this line ////////
REM Pull, display and create some time functions
for /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('yyyyMMddHHmmss')"') do set endtime=%%G
for /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('HH:mm:ss')"') do set nowtimeclean=%%G
for /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('HH:mm:ss')"') do set endtimeclean=%%G
echo %time% - %gameserver% Server started at %nowtimeclean% and will restart at %endtimeclean%
:checkarma
for /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('yyyyMMddHHmmss')"') do set nowtime=%%G
REM ////////// TIMER CHECK ///////////
if "%nowtime%" gtr "%endtime%" (
echo %time% - It is time to restart %gameserver%!
echo.
echo.
goto restartarma
)
REM ////////// END TIMER CHECK ///////////
REM ////////// PROCESS CHECK ///////////
tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="1" (
echo %time% - The process is not running, restart %gameserver%!
echo.
echo.
goto restartarma
)
REM ////////// END PROCESS CHECK ///////////
REM restart not needed. Check again in 3 seconds.
TIMEOUT /T 3 /NOBREAK >NUL
goto checkarma
:restartarma
REM Either the server crashed or it is time for a restart. Kill the process and go to start.
START taskkill /f /im arma3server.exe 2>nul
TIMEOUT /T 3 /NOBREAK >NUL
goto start
der Restart soweit funktioniert also der Server wird gestoppt, aber er Startet nicht mehr weill immer eine Fehlermeldung kommt das arma nicht mehr funktioniert.