Advertisement
Gaxon2020

Citadel Auto Update

Feb 21st, 2020
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.19 KB | None | 0 0
  1. rem ___________________
  2. rem BEGIN CONFIGURATION
  3. rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  4. rem Location to directory containing steamcmd.exe
  5. set SteamCMD_Dir=C:\steamcmd
  6. rem Location to directory that the Server will be installed in
  7. set Server_Dir=C:\citadel
  8. rem Server Executable
  9. set Server_Executable=CitadelServer-Win64-Shipping.exe
  10. rem Text File for update log
  11. set Text_File=Citadel.txt
  12. rem Steam APP ID
  13. set Steam_ID=489650
  14. rem ________________
  15. rem BEGIN BATCH CODE
  16. rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  17. cls
  18. @echo off
  19. title Citadel Auto Updater v1.3         by Gaxon
  20. :start
  21. color 0E
  22. echo.
  23. echo Checking For Update
  24. echo.
  25. echo DO NOT CLOSE WINDOW
  26. echo.
  27. start "" /w /b /wait "%SteamCMD_Dir%\steamcmd.exe" +login anonymous +force_install_dir "%Server_Dir%" +app_update %Steam_ID% +quit>%Server_Dir%\%Text_File%
  28. Type %Server_Dir%\%Text_File%
  29. Find "already up to date." %Server_Dir%\%Text_File%
  30. if ERRORLEVEL=1 goto kill
  31. if ERRORLEVEL=0 goto update
  32. :update
  33. color 0A
  34. echo.
  35. echo Auto Update Running
  36. timeout /t 900
  37. goto start
  38. :kill
  39. color 0C
  40. echo.
  41. echo UPDATE FOUND, RESTARTING SERVER
  42. timeout /t 30
  43. echo CTRL + C to Pause shutdown
  44. taskkill /im "%Server_Executable%" /f /t
  45. goto update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement