TheGamingChief

Start ArmA Reforger Server.bat (Auto-restarts after crash)

May 20th, 2022 (edited)
1,097
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. TITLE ArmA Reforger Server - Status
  3. COLOR 0A
  4.    :: DEFINE the following variables where applicable to your install.
  5.     :: Make sure your ConfigFolder has your account name and not Administrator if you are not using the built-in Windows admin account!
  6.     SET SteamLogin=anonymous
  7.     SET ReforgerBranch=1874900
  8.     SET ReforgerServerPath="C:\Servers\ArmAReforger"
  9.     SET SteamCMDPath="C:\Servers\SteamCMD"
  10.     SET ConfigFolder="C:\Users\Administrator\Documents\My Games\ArmaReforger\profile"
  11.    :: _______________________________________________________________
  12.  
  13.  
  14. goto checkServer
  15. pause
  16.  
  17. :checkServer
  18. tasklist /fi "imagename eq ArmaReforgerServer.exe" 2>NUL | find /i /n "ArmaReforgerServer.exe">NUL
  19. if "%ERRORLEVEL%"=="0" goto loopServer
  20. cls
  21. echo Server is not running, taking care of it..
  22. goto killServer
  23.  
  24. :loopServer
  25. FOR /L %%s IN (30,-1,0) DO (
  26.     cls
  27.     echo Server is running. Checking again in %%s seconds..
  28.     timeout 1 >nul
  29. )
  30. goto checkServer
  31.  
  32. :killServer
  33. taskkill /f /im ArmaReforgerServer.exe
  34. goto updateServer
  35.  
  36. :updateServer
  37. cls
  38. echo Updating ArmA Reforger Server.
  39. timeout 1 >nul
  40. cls
  41. echo Updating ArmA Reforger Server..
  42. timeout 1 >nul
  43. cls
  44. echo Updating ArmA Reforger Server...
  45. cd "%SteamCMDPath%"
  46. steamcmd.exe +force_install_dir %ReforgerServerPath% +login %SteamLogin% +"app_update %ReforgerBranch%" +quit
  47. goto startServer
  48.  
  49. :startServer
  50. cls
  51. echo ArmA Reforger Server.
  52. timeout 1 >nul
  53. cls
  54. echo ArmA ReforgerA Server..
  55. timeout 1 >nul
  56. cls
  57. echo ArmA Reforger Server...
  58. cd "%ReforgerServerPath%"
  59. start ArmaReforgerServer.exe -config %ConfigFolder%\config.json -maxFPS 120
  60. goto checkServer
RAW Paste Data Copied