For those who don't have this here is the TWB auto-reboot on crash batch file code.
TWI use the same code to allow your server to auto reboot on a crash detection.
Replace our server name and IP (and anything else you want to replace) with your own details in a .txt file then change that file to a .bat file.
Place this .bat file in your RO2 server root folder and make a shortcut and place it on your servers desktop.
Doouble click the .bat to start your server and away you go.
::=======================::
:: Server Guardian ::
::=======================::
::=======================::
:: SET YOUR VARIABLES! ::
::=======================::
::=======================::
:: Window and Log name ::
:: Replace "My Server" ::
::=======================::
set servername=Your Servers Name
::=======================::
:: Your start command ::
:: Replace after = ::
::=======================::
set runcmd=C:\your-server-folder\Binaries\win32\ROGame TE-MamayevKurgan?EnableWebAdmin=True?WebAdminPort=8585?minplayers=16?maxplayers=64 -seekfreeloadingserver -noinnerexception -multihome=109.70.149.99 -port=7777 -log=yourlog.log -PREFERPROCESSOR=0 -unattended
::=======================::
:: End of variables ::
::=======================::
:: This will keep the window clean and easy to read
@echo off
:: Sets the title of the window
title Server Guardian %servername%
:: Clears the window incase there is anything there
cls
:: Prints to the window what we are doing
echo Server Guardian has been started!
echo.
echo *************************************************************************
echo To close the server, close this window and type exit in the server window
echo *************************************************************************
echo.
echo.
echo %servername% is now starting...
>> "%servername%.log" echo.
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Server Guardian has been started!
>> "%servername%.log" echo (%date%)(%time%) %servername% is now starting...
:: This is a return point in case the server crashes or is closed
:restart
echo.
echo (%date%)(%time%) %servername% is now ONLINE
echo Watching %servername% for crashes...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) %servername% is now ONLINE
>> "%servername%.log" echo (%date%)(%time%) Watching %servername% for crashes...
::Start the actual server
start /wait %runcmd%
echo.
echo (%date%)(%time%) Crash or Close detected!
echo %servername% is now restarting...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Crash or Close detected!
>> "%servername%.log" echo (%date%)(%time%) %servername% is now restarting...
::Server crashed or closed, so we point it to the return point to start the server again
goto restart
TWI use the same code to allow your server to auto reboot on a crash detection.
Replace our server name and IP (and anything else you want to replace) with your own details in a .txt file then change that file to a .bat file.
Place this .bat file in your RO2 server root folder and make a shortcut and place it on your servers desktop.
Doouble click the .bat to start your server and away you go.
::=======================::
:: Server Guardian ::
::=======================::
::=======================::
:: SET YOUR VARIABLES! ::
::=======================::
::=======================::
:: Window and Log name ::
:: Replace "My Server" ::
::=======================::
set servername=Your Servers Name
::=======================::
:: Your start command ::
:: Replace after = ::
::=======================::
set runcmd=C:\your-server-folder\Binaries\win32\ROGame TE-MamayevKurgan?EnableWebAdmin=True?WebAdminPort=8585?minplayers=16?maxplayers=64 -seekfreeloadingserver -noinnerexception -multihome=109.70.149.99 -port=7777 -log=yourlog.log -PREFERPROCESSOR=0 -unattended
::=======================::
:: End of variables ::
::=======================::
:: This will keep the window clean and easy to read
@echo off
:: Sets the title of the window
title Server Guardian %servername%
:: Clears the window incase there is anything there
cls
:: Prints to the window what we are doing
echo Server Guardian has been started!
echo.
echo *************************************************************************
echo To close the server, close this window and type exit in the server window
echo *************************************************************************
echo.
echo.
echo %servername% is now starting...
>> "%servername%.log" echo.
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Server Guardian has been started!
>> "%servername%.log" echo (%date%)(%time%) %servername% is now starting...
:: This is a return point in case the server crashes or is closed
:restart
echo.
echo (%date%)(%time%) %servername% is now ONLINE
echo Watching %servername% for crashes...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) %servername% is now ONLINE
>> "%servername%.log" echo (%date%)(%time%) Watching %servername% for crashes...
::Start the actual server
start /wait %runcmd%
echo.
echo (%date%)(%time%) Crash or Close detected!
echo %servername% is now restarting...
>> "%servername%.log" echo.
>> "%servername%.log" echo (%date%)(%time%) Crash or Close detected!
>> "%servername%.log" echo (%date%)(%time%) %servername% is now restarting...
::Server crashed or closed, so we point it to the return point to start the server again
goto restart