You can write your own script based on srcdsupdatecheck:

#!/bin/bash
servers="server1 server2 server3 server4"
serversrestart="server_blubb1 server2 server4 usw"
serverfiles=~/serverfiles/css
serverdir=~/da/sind/deine/server/
startscript=/pafd/zu/run.sh

update_server() {
    ./steam -command update -game "Counter-Strike Source" -dir $1
    }

update_symlinks() {
    for server in $3; do
        cp -rs $1/* $2/$server/ &> /dev/null
    done
    }

restart_servers() {
    for server in $2; do
        $1 restart $server
    done
    }


if ! ( ./srcupdatecheck ~/serverfiles/css/orangebox/cstrike/steam.inf
| grep -q '^Got three non-rejected queries, UP TO DATE!' ); then
    update_server "$serverfiles"
    update_symlinks "$serverfiles" "$serverdir" "$servers"
    restart_servers "$startscript" "$serversrestart"
fi


Code untested...

The if statement executes the srcdsupdatecheck and grep the Output:
"Got three non-rejected queries, UP TO DATE". When the output doesn't
come, the if-block will be executed.

The function update_symlinks is only for servers which are using symlinks.

After an update you can restart all your servers with your own
startscript. When you've tested the code, you can make a cronjob, wich
maybe run all 17th minutes the script.

Andre Müller
sourceserver.info


2011/2/22 Daniel Nilsson Jokiaho <[email protected]>:
> Im doing the opposit. Having multiple install dirs and varios scripts that
> updates those :(
>
> I have it this way because of need for different server.cfg, /maps and
> /addons.. Can i change this to one install and then use your script?
>
> //Daniel
>
>
>
> Nephyrin Zey skrev 2011-02-22 10:56:
>>
>> We may, in fact, be as high as six users. I am astounded! Be sure to let
>> me know if you have any feature requests :-P
>>
>> PS Join the hang out in #hlserveradmins @ irc.gamesurge.net
>>
>> - Neph
>>
>> On 02/21/2011 11:35 AM, Kaspars wrote:
>>>
>>> Sorry but I'm using this script longer than you :) I'm just staying in
>>> the shadows... ok, actually I'm using only the "srcupdatecheck" from the
>>> package, but that still qualifies me as an user of this fine stuff :) High
>>> five!
>>>
>>> On 2011.02.21. 19:27, Eli Witt wrote:
>>>>
>>>> Thanks Neph!
>>>>
>>>> I never knew about your script up until about 2 months ago when I was
>>>> using
>>>> my very limited hacked together script and googling a lot of stuff about
>>>> srcds and bash when I stumbled across it, the way I installed my servers
>>>> was
>>>> really archaic in terms of directory trees, and I found your script so
>>>> awesome I simply rm -rf'ed /home/hlds and redid everything from scratch
>>>> via
>>>> yours.
>>>>
>>>>
>>>> So does this make me #4?
>>>>
>>>>
>>>> =D
>>>>
>>>> On Fri, Feb 18, 2011 at 3:39 PM, Nephyrin
>>>> Zey<[email protected]>wrote:
>>>>
>>>>> For all three of you out there using this script, I've made some minor
>>>>> updates, which can be found here:
>>>>> http://nephyrin.net/tools/nemrun/1.6/
>>>>>
>>>>> Mainly, it now works with L4D2's newer steam.inf format
>>>>>
>>>>> - Neph
>>>>>
>>>>> _______________________________________________
>>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>>> please visit:
>>>>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>>>>
>>>> _______________________________________________
>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>> please visit:
>>>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>>
>>>
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to