Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem ___________________
- rem BEGIN CONFIGURATION
- rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- set SteamCMD_Dir=C:SteamCMD Directory
- rem ^ Location to dirctory containing steamcmd.exe ^
- set Server_Dir=C:\ServerDirectoryHere
- rem ^ Location to directory that the Citadel Server will be installed in ^
- set Executable_Dir=C:\ServerDirectoryHere\Citadel\Binaries\Win64
- rem ^ Location to directory containing the following executable ^
- set Server_Executable=CitadelServer-Win64-Shipping.exe
- rem ________________
- rem BEGIN BATCH CODE
- rem ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
- cls
- @echo off
- title Citadel Server Watchdog made by fatguy1121
- echo DO NOT CLOSE THIS WINDOW!
- echo.
- :start
- tasklist /nh /fi "Imagename eq %Server_Executable%" | find "CitadelServer"
- if ERRORLEVEL=1 goto update
- if ERRORLEVEL=0 goto close
- :update
- echo Checking For Update
- start "" /b /w /high "%SteamCMD_Dir%\steamcmd.exe" +login anonymous +force_install_dir "%Server_Dir%" +app_update 489650 validate +quit
- echo.
- echo If No Errors Exist, The Server Has Been Started! Check Task Manager
- echo.
- echo Waiting For Crash...
- cd "%Executable_Dir%"
- start "" /w /high "%Server_Executable%" -nosteamclient -server &:: Using "-log" Will Prevent Automatic Crash Detection
- echo Crash Detected!
- echo.
- echo CTRL+C To Freeze Before Restarting
- timeout /t 15
- goto start
- :close
- echo.
- echo !ERROR! SERVER ALREADY RUNNING! SHUTDOWN WILL COMMENCE
- taskkill /im "%Server_Executable%" /f /t
- timeout /t 3
- goto start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement