SRCDS Steam group


[RESLOVED] Autorestart Batch Script-Can i Check updates and launch srcds after delay
#1
[Resloved]

Server OS: Windows Server 2003 Standard x64-edition
Ram: 1GB
Game(s): CS:S
Start Up Command: Thats how it looks like and worked Great

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 css1 Watchdog
:update
echo (%time%) (%date%) update started.
start hldsupdatetool.exe -command update -game "Counter-Strike Source" -dir "./css/css1"
sleep 900
:srcds
echo (%time%) (%date%) srcds started.
start /RealTime /wait ./css/css1/orangebox\srcds.exe -secure -console -game cstrike -ip "x" -port "x" -pingboost 3 -maxplayers 24 +map de_dust2
echo (%time%) (%date%) WARNING: srcds closed or crashed, restarting.
goto update
goto srcds
Admin Mods: SourceMod, MetaMod,

Hi guys my question is can i somehow let the server using the autorestart script after issuing quit using rcon to check for updates and install them then closes the hldsupdatetool window and as soon as the hldsupdatetool closes the server launch or after periodic time weather the hldsupdatetool closed or not and how to do that .

I meant to perform rcon_address and rcon_password and rcon quit when the server is not accessible in way other than rcon because of it's being not up2date

let's say that i don't have the root access how would i update the server
so it would be only to update manually when an update releases and i can't physically access the server software
Reply
#2
You could let it perform an update command before starting the server, though it will require a server restart and if you don't minitor your server you cannot really know werether there is an update or not.
Reply
#3
(03-08-2011, 06:21 AM)realchamp Wrote:  You could let it perform an update command before starting the server, though it will require a server restart and if you don't minitor your server you cannot really know werether there is an update or not.

i am not intending to let the server update at startup or whenever an update released cause i know it's simply not possible
i meant let say that an update released and i got only rcon without root access
i would perform rcon quit with rcon_password and rcon_address to allow the server to shutdown and check for updates then launch or launch after delay lets say 15 mins
i hope this clears thing out
Thanks
Reply
#4
(03-08-2011, 06:27 AM)a7m1 Wrote:  i meant let say that an update released and i got only rcon without rdp access
i would perform rcon quit with rcon_password and rcon_address to allow the server to shutdown and check for updates then launch or launch after delay lets say 15 mins
i hope this clears thing out
Thanks
There are no command with RCon which would allow you to update the server. And you cannot delay the startup progress(for 15minutes eg), without using an addon which does this or having some sort of a script.

(03-08-2011, 06:27 AM)a7m1 Wrote:  i am not intending to let the server update at startup or whenever an update released cause i know it's simply not possible
It is possible, but it will require some other methods and a more advanced system.
Reply
#5
start hldsupdatetool.exe -command update -game "Counter-Strike Source" -dir "./css/css1"
start /RealTime /wait .\css\css1\orangebox\srcds.exe -secure -console -game cstrike -ip 194.54.229.8 -port 27015 -pingboost 3 -maxplayers 24 +map de_dust2

i know the first line is placed wrong
however i would like the autorestart script whenever the server shutdown to launch the update command then wait a delay OR as soon as the update window closed then launch the server
it's not the srcds that do the update on rcon quit
its the autorestart script
is that possible ?
Reply
#6
Ahh I think I got it now.

Try adding a sleep(2000) - that would make it sleep.
Reply
#7
where to add the command ? in between the update and the launch command ?
Thanks for help
Reply
#8
(03-08-2011, 07:30 AM)a7m1 Wrote:  where to add the command ? in between the update and the launch command ?
Thanks for help

Yeh I'd assume that's similair to what you want Smile
Reply
#9
oki the value is in seconds or ms ?
i have tried sleep(2000) and sleep 2000
between the update and launch command however it says sleep is not recognized as interal or external command

it seems that i have to install a software to intigrate the sleep command
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en
Note: The Windows Server 2003 Resource Kit Tools are not supported on 64-bit platforms.
what to do man
update , however i managed to get it working by copying the sleep.exe to system32 dictionary
i discovered that the time is in seconds and can be set to miliseconds by using -m after sleep
Thanks
Any idea how to start the server minimized ?
Reply
#10
Hmm to start the server minimized, you mean like in the background? Try starting it is as service. Not sure if that would work Smile
Reply
#11
not in the background as service
i mean minimized just like clicking the minimize and maximize keys - and +
any ideas Smile thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)