Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
8,482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.61 KB | None | 0 0
  1. rem ___________________
  2. rem BEGIN CONFIGURATION
  3. rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  4. set SteamCMD_Dir=C:SteamCMD Directory
  5. rem ^ Location to dirctory containing steamcmd.exe ^
  6. set Server_Dir=C:\ServerDirectoryHere
  7. rem ^ Location to directory that the Citadel Server will be installed in ^
  8. set Executable_Dir=C:\ServerDirectoryHere\Citadel\Binaries\Win64
  9. rem ^ Location to directory containing the following executable ^
  10. set Server_Executable=CitadelServer-Win64-Shipping.exe
  11. rem ________________
  12. rem BEGIN BATCH CODE
  13. rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  14. cls
  15. @echo off
  16. title Citadel Server Watchdog                                                                                                                                                                   made by fatguy1121
  17. echo DO NOT CLOSE THIS WINDOW!
  18. echo.
  19. :start
  20. tasklist /nh /fi "Imagename eq %Server_Executable%" | find "CitadelServer"
  21. if ERRORLEVEL=1 goto update
  22. if ERRORLEVEL=0 goto close
  23. :update
  24. echo Checking For Update
  25. start "" /b /w /high "%SteamCMD_Dir%\steamcmd.exe" +login anonymous +force_install_dir "%Server_Dir%" +app_update 489650 validate +quit
  26. echo.
  27. echo If No Errors Exist, The Server Has Been Started! Check Task Manager
  28. echo.
  29. echo Waiting For Crash...
  30. cd "%Executable_Dir%"
  31. start "" /w /high "%Server_Executable%" -nosteamclient -server &:: Using "-log" Will Prevent Automatic Crash Detection
  32. echo Crash Detected!
  33. echo.
  34. echo CTRL+C To Freeze Before Restarting
  35. timeout /t 15
  36. goto start
  37. :close
  38. echo.
  39. echo !ERROR! SERVER ALREADY RUNNING! SHUTDOWN WILL COMMENCE
  40. taskkill /im "%Server_Executable%" /f /t
  41. timeout /t 3
  42. goto start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement