Raised This Month: $12 Target: $400
 3% 

Solved [CS:GO] Questions regarding -autoupdate server parameter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Astinox
Junior Member
Join Date: Mar 2016
Old 11-14-2022 , 03:16   [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #1

Hey guys,

I am currently hosting a few servers. All of those servers are compared regulary to some master files, and if they are mismatching, it triggers an update for all of those. Recently I've seen that there is an -autoupdate option and checked it out over on the Valve Dev Wiki.

It lists what is needed for it to work, but not exactly how it works. Hence the question: What does -autoupdate exactly run?
  • Does it run updates instantly once it is available and restarts the server?
  • Does it run the update when the server is empty / hibernating?
  • Does it kick players and closes the server instantly once an update hits?

Haven't been using this since now and just wanted to know if anyone has some experience with it

Last edited by Astinox; 11-14-2022 at 10:49. Reason: Answered
Astinox is offline
BeepIsla
Member
Join Date: Mar 2020
Location: Germany
Old 11-14-2022 , 05:03   Re: [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #2

The only thing the game does with the "-autoupdate" launch option is shut off the server the next time hibernation starts (or immediately when already hibernating) when the server is marked as "Out of date" by Steam, it does not kick any player and it might take upwards of 1 hour for an update to roll out to all servers and clients.

The "srcds_run" script that actually starts the server will run SteamCMD (Which will cause the server to update) if configured to do so using "-steam_dir" to point to the directory where the "steamcmd.sh" file is and "-steamcmd_script" to point to the SteamCMD-Script to execute.

This only works on linux. An example would be:

Code:
./srcds_run -game csgo -autoupdate -steam_dir /home/Steam/ -steamcmd_script /home/Steam/csgo/steamcmd_update.txt

Last edited by BeepIsla; 11-14-2022 at 05:04. Reason: Clearify
BeepIsla is offline
Astinox
Junior Member
Join Date: Mar 2016
Old 11-14-2022 , 10:49   Re: [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #3

Cheers, thank you for the clarification. That makes total sense and is indeed a pretty good idea! Also thanks for the information in regards to how long it can possible take for the update to kick in.
Astinox is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 11-14-2022 , 13:16   Re: [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #4

can someone tell my why my server always needs the "steam.sh" file for auto updating? When i download steamcmd for linux and setup -autoupdate correctly it tells me always at server start/restart (steam.sh) not found. my steamcmd wants a steam.sh. i found an old steam.sh file which i add to the steamcmd folder and with this autoupdating works fine. if i remove the steam.sh file, autoupdate stopped working.

here is an output without the steam.sh file:

PHP Code:
./srcds_run32: ./srcds_runpushdnot found
./srcds_run35: ./srcds_runpopdnot found
Server will auto
-restart if there is a crash.
Updating server using Steam.
----------------------------
./
srcds_run1: eval: ./steam.shnot found
----------------------------
LD_LIBRARY_PATH=/home/gameserver/csgoserver/bin:/home/gameserver/csgoserver:/home/gameserver/csgoserver/bin:
#
#Console initialized. 
Her is a output with the steam.sh file:

PHP Code:
./srcds_run32: ./srcds_runpushdnot found
./srcds_run35: ./srcds_runpopdnot found
Server will auto
-restart if there is a crash.
Updating server using Steam.
----------------------------
WARNINGsetlocale('en_US.UTF-8'failedusing locale'C'International characters may not work.
Redirecting stderr to '/home/game/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] 
Verifying installation...
Steam Console Client (cValve Corporation version 1666144101
-- type 'quit' to exit --
Loading Steam API...OK
[1m@ShutdownOnFailedCommand 1
[0m"@ShutdownOnFailedCommand" "1"
[0m[1m@NoPromptForPassword 1
[0m"@NoPromptForPassword" "1"
[0m[1mforce_install_dir /home/gameserver/csgoserver
[0m
Connecting anonymously to Steam 
Public...OK
Waiting 
for client config...OK
Waiting 
for user info...OK
[1mapp_update 740
[0mSuccessApp '740' already up to date.
[
1mquit
[0m----------------------------
LD_LIBRARY_PATH=/home/gameserver/csgoserver/bin:/home/gameserver/csgoserver:/home/gameserver/csgoserver/bin:
#
#Console initialized. 
Why do i need this file????? This file is 10 years old and needed for autoupdating at all my servers i had in history, i don't understand. i use steamcmd directly from steam website.

Edit: When i look at the original srcds_run file, it says on line 301.

PHP Code:
eval "STEAMEXE=steamcmd ./steam.sh +runscript $STEAMCMD_SCRIPT
but steamcmd comes without steam.sh, just with steamcmd.sh

Edit 2: it works when i edit the srcds_run file and replace line 301 steam.sh with steamcmd.sh. but that can't be a solution while it works for others without these changes....

Last edited by asdfxD; 11-14-2022 at 13:28.
asdfxD is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 11-14-2022 , 13:58   Re: [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #5

I did away with the srcds_run script a long time ago, I was also having problems with the -autoupdate for a while: "srcds_run: 1: eval: +runscript: not found" - I needed to remove 'eval' and just run steamcmd.sh directly. I ended up duplicating the script, stripping a lot out, and putting all my params inside of it, I just run that now and I know it wont get overwritten anymore.
hamilton5 is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 11-16-2022 , 01:14   Re: [CS:GO] Questions regarding -autoupdate server parameter
Reply With Quote #6

Quote:
Originally Posted by hamilton5 View Post
I did away with the srcds_run script a long time ago, I was also having problems with the -autoupdate for a while: "srcds_run: 1: eval: +runscript: not found" - I needed to remove 'eval' and just run steamcmd.sh directly. I ended up duplicating the script, stripping a lot out, and putting all my params inside of it, I just run that now and I know it wont get overwritten anymore.
do you use symlinking ?

if yes then you need to check properties owner of it
__________________
.:[ >> My Plugins << ]:.

My discord : oqyh
oqyh is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode