Quote:
Originally Posted by TnTSCS
I have a working batch file that will update the servers (the first time you execute the batch file) and then start the game server... upon game crash, it will auto-restart the game server.
I got the update information from here... and the game restart upon crash was from ages ago for our CS:S server...
For this example, steamcmd is in c:\steamcmd along with update_csgo.txt. My game is installed in srcds_go:
batch file looks something like:
Code:
::=======================::
:: SRCDS Guardian 3.0 ::
:: Mooga ::
:: SRCDS.com ::
::=======================::
::=========================================================::
:: Thanks To Black-Sky & Drocona for making SRCDS Guardian ::
:: This script is open source. Feel free to edit at will. ::
:: ::
:: This script was writen for the use of the srcds.com ::
:: online community. If you are interested in running a ::
:: Source Dedicated Server or need help, drop by our ::
:: forums at... http://forums.srcds.com ::
::=========================================================::
set updcmd=c:\steamcmd\SteamCmd.exe +runscript update_csgo.txt
set servername=Your Server Name Here
set runcmd=c:\srcds_go\srcds.exe -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust2
@echo off
title SRCDS Guardian 3.0 %servername%
cls
echo ***********************************************************************
echo Now checking for CSGO Updates, server will start after this is complete
echo ***********************************************************************
echo .
start /wait %updcmd%
echo :: Update process complete ::
echo SRCDS Guardian 3.0 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%) SRCDS Guardian 3.0 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
the update_csgo.txt looks like:
Code:
login user pass
force_install_dir C:\srcds_go\
app_update 740
quit
|
It should automaticly look for updates right? CS:GO just had a silent update.
Edit, I filled in my steam login and password and now it works.