SRCDS Steam group


Linux autoupdate w/TF2- does it work, or not?
#1
I've been trying to figure out if the -autoupdate option works on srcds for Linux. I've seen conflicting threads & information on here and from Google, and I seem to be having a problem with it locating the Steam binary. Aside from not auto-updating, my server runs fine.

Code:
Auto detecting CPU
Using SSE2 Optimised binary.
Server will auto-restart if there is a crash.
Could not locate steam binary:./steam, ignoring.

Console initialized.
Game.dll loaded for "Team Fortress"
Particles: Missing 'particles/error.pcf'
maxplayers set to 24

For some reason, it's trying to read the steam binary from the current directory, yet it's actually one directory up from where the server is supposed to be launched from.

If I create a symlink for "steam" to "../steam" in the current directory, this is what I get:

Code:
Auto detecting CPU
Using SSE2 Optimised binary.
Server will auto-restart if there is a crash.
Updating server using Steam.
Checking bootstrapper version ...
Updating Installation
Unable to load test module "test1.so"
"steam" must be run from the directory it is installed in.
You can ensure this by running: "./steam" from its installation directory.
Thu Jan 10 01:03:25 EST 2008: Steam Update failed, ignoring.

Console initialized.
Game.dll loaded for "Team Fortress"
Particles: Missing 'particles/error.pcf'
maxplayers set to 24

If I try running the game from the directory the real steam binary is in, I get this:

Code:
[inferno@localhost srcds]$ ./orangebox/srcds_run -console -game tf -port 27015 +fps_max 600 -tickrate 66 +map ctf_2fort -autoupdate
Invalid game type 'tf' sepecified.

What gives??? Does it really work, and is there any way to make it work?
Reply
#2
no it does not work because the -autoupdate flag looks for steam in the wrong place, there's a bug listed for this already. you have to do the update manually ie
Code:
./steam -command update -game tf -dir whereveryourdiris
Reply
#3
I made a quick fix for this problem..
Get it here: http://www.dbaranski.net/node/6
Reply
#4
actually i think valve fixed this as well, if you do a clean install it changes the directory from what it was before. i have not checked if autoupate worked as i was debugging something else.
Reply
#5
Yeah, if you do a clean install there is no orangebox directory anymore.
[Image: sig_spam.JPG]
Reply
#6
hah! Shows how often I do clean installs. Thanks for the heads up guys.
Reply
#7
errr, to confirm that this worked I attempted a clean install and autoupdate still doesn't work.. is this for a srcds_linux install?
Reply
#8
Can anyone confirm that a clean install will allow autoupdate to work out of the box? I'm having issues with the server shutting down on every map change, which is apparently due to an update being available.

I checked the version of the server and i get

Exe version 1.0.2.9 (tf)
Exe build: 06:04:58 May 20 2008 (3482) (440)

which i assume means it hasnt been updated since at least then, although i though it had been updating.
Reply
#9
I don't know if a clean install will fix the problem but I do know this will auto-patch your srcds_run file if you stick it in your crontab:

Code:
perl -pi.bak -e 's/updatesingle[^;(]/cd ..; updatesingle; cd orangebox;\n/g;' /home/hlds/orangebox/srcds_run

or crontab style:

55 * * * * perl -pi.bak -e 's/updatesingle[^;(]/cd ..; updatesingle; cd orangebox;\n/g;' /home/hlds/orangebox/srcds_run

This is basically taking oo22's fix and applying it over and over whenever necessary. Which is required because after an auto update Steam'll replace your srcds_run with a stock or updated version, thus erasing your hack to fix auto-update.
Reply
#10
injate Wrote:I don't know if a clean install will fix the problem but I do know this will auto-patch your srcds_run file if you stick it in your crontab:

Code:
perl -pi.bak -e 's/updatesingle[^;(]/cd ..; updatesingle; cd orangebox;\n/g;' /home/hlds/orangebox/srcds_run

or crontab style:

55 * * * * perl -pi.bak -e 's/updatesingle[^;(]/cd ..; updatesingle; cd orangebox;\n/g;' /home/hlds/orangebox/srcds_run

This is basically taking oo22's fix and applying it over and over whenever necessary. Which is required because after an auto update Steam'll replace your srcds_run with a stock or updated version, thus erasing your hack to fix auto-update.

Great tip! However, it seems that perl replaces the backup file again and again even after the substitution has been done. Is there a way to only save a backup of the original file and not do anything when the file has been patched?
Reply
#11
Hm...You're right. I assumed it would only back it up if it actually matched the perl regular expression...guess it backs it up regardless of the results. Not sure how to fix that. I don't really mind since the backup isn't necessary as long as the perl doesn't break srcds_run, which it hasn't so far.
Reply
#12
Does that mean its working on Windows now? Rolleyes
Clan of Doom: www.clanofdoom.co.uk






Reply
#13
injate Wrote:Hm...You're right. I assumed it would only back it up if it actually matched the perl regular expression...guess it backs it up regardless of the results. Not sure how to fix that. I don't really mind since the backup isn't necessary as long as the perl doesn't break srcds_run, which it hasn't so far.

I whipped together a small bash-script to to some checking before substituting. I use sed for the substitution, but you could just as well use the perl in this thread if you wanted to. I place the script in the hlserver users folder (in my case /opt/hlserver/) and run /opt/hlserver/srcds_patcher.sh in the cron job instead.


Attached Files
.txt   srcds_patcher.sh.txt (Size: 515 bytes / Downloads: 67)
Reply
#14
Saying they removed the orangebox directory in a clean install is an out right lie.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)