SRCDS Steam group


Windows Auto-Updating Watchdog
#1
Hello everyone, this is my first post on these forums!

After reading that the -autoupdate function does not work on a windows server, I started looking for a way to update my server when I "quit" from console or my server crashed. I created a solution, so I thought I would share it. If you have any way of improving on this batch script, please let us know. For now all my servers run on this and it works perfectly. Thanks to whoever first created this watchdog!

Code:
@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title SRCDS Auto-Update Watchdog
:srcds
echo (%time%) srcds started.
start /wait /min /Low C:\<directory>\hldsupdatetool -command update -game "tf" -dir C:\<directory>
start /wait /min /High C:\<directory>\orangebox\srcds.exe -console -game tf -tickrate 66 -maxplayers 32 -port 27015 +map pl_badwater +ip ***.***.***.*** +fps_max 600 +sv_pure 1 +sv_lan 0
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds
Reply
#2
This should work. It looks like my version of it. Smile

You can't really do any other changes Smile
Reply
#3
Yeah, I wasn't sure who first created it. Although I edited it to include the auto-update, minimize and priority parts, I wouldn't have got far without the original. Thanks again!
Reply
#4
Maybe stupid question but when the server is out of date it doesnt crashes(i wish it would) but if it would and u use the script, how can u set multiple scripts to watch more then 1 server??
Cause i run 8 HL2 based servers from 1 box, but now i need to rename the exe files (dm.exe instead of srcds.exe) to keep the watchdog looking for the right exe file otherwise it starts allot of processes.
Cause i think it then sees 8x srcds.exe running and thinks everything is ok.

Example on what script i use now for deathmatch server:
Code:
@ECHO OFF
cls

:LOOP
@QPROCESS Deathmatch.exe
cls
ECHO [Server Restart Script]
ECHO.
ECHO Running
ECHO.

If errorlevel 1 GOTO STARTER

ECHO SERVER STATUS: ONLINE

PING 127.0.0.1 -w 1000 > NUL

GOTO LOOP

:STARTER

ECHO SERVER STATUS: OFFLINE

start /min /wait /b /affinity 4 Deathmatch.exe -console -game cstrike -ip 00.00.00.00 +map de_dust2 -maxplayers 32 -autoupdate -tickrate 66


GOTO LOOP

k this script just sux, using the one standing above and now i can run 2x srcds.exe Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)