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

Unload plugins per server on a multiple server setup


Post New Thread Reply   
 
Thread Tools Display Modes
DeaD_EyE82
AlliedModders Donor
Join Date: Jan 2006
Location: Germany
Old 06-19-2010 , 19:59   Re: Unload plugins per server on a multiple server setup
Reply With Quote #11

Code:
steam -command update -game "Counter-Strike Source" -dir ~/masterserver/
mkdir -p ~/configexample/cstrike/cfg

touch ~/configexample/cstrike/cfg/server.cfg
touch ~/configexample/cstrike/cfg/autoexec.cfg
touch ~/configexample/cstrike/maplist.txt
touch ~/configexample/cstrike/mapcycle.txt
#make empty files for your configexample
#you can edit them, before you will start to create your servers

mkdir ~/server1
mkdir ~/server2
mkdir ~/server3
mkdir ~/server4

cp -R ~/configexample/* ~/server1/
#cp -sR ~/mappool/* ~/server1/ #maybe you have a big mappool for all your serers
cp -sR ~/masterserver/* ~/server1/

cp -R ~/configexample/* ~/server2/
cp -sR ~/masterserver/* ~/server2/


cp -R ~/configexample/* ~/server3/
cp -sR ~/masterserver/* ~/server3/
...

then upload your plugins und different configs.

After an update you have to create new symlinks. Sometimes the srcds gets some new files and often files are removed by steam too.

Update your Symlinks with cp -sR ~/masterserver/* ~/server1/ $>/dev/null

The redirection to /dev/null is required to supress the errors.

Some times Symlinks are broken. You can use this command to delete all broken Symlinks in your server

Code:
find -L ~/server1 -type l -delete
For easier handling you can create a subdir for the real servers. Only the masterserver should't be in the same subdir (for better overview)

With symlinks you will safe much space on your hardisk. Updates are faster, because you have only to update the masterserver and after this, if required, update your symlinks.

For a big mappool you can create a mappool dir with the same strucure as the masterserver (~/mappool/cstrike ~/mappool/csrtike/maps ...)

After you have uploaded a new map into ~/mappool/csrtike/maps you have to refresh the symlinks of all your servers:

Code:
cp -sR ~/mappool/* ~/server1/ &> /dev/null
cp -sR ~/mappool/* ~/server2/ &> /dev/null
cp -sR ~/mappool/* ~/server3/ &> /dev/null
cp -sR ~/mappool/* ~/server4/ &> /dev/null
cp -sR ~/mappool/* ~/server5/ &> /dev/null
Now you can change the Map on your server. If you are Using a Webserver on the same Host, you can create a symlink from mappool in your Webdirectory. You have to allow symlinks in your Webserverconfig.

In the other case (rented Webserver or other root,vserver e.g) you can use for syncing your mappool with the webspace the tool lftp (supports mirroring) or rsync, when you have ssh access on your host.

Maybe there are some others who interested for using symlinks in conjunction of gameservers.

All big providers are using this concept (mappool exluded).
Maybe they realize the fastdl with a combination of a php-script and a shell-script. For my server I'm using a little script, which will make a compressed mappool for fastdownload.
__________________
German Support for HL2-Servers:

sourceserver.info
DeaD_EyE82 is offline
Send a message via ICQ to DeaD_EyE82
BentByBogus
Junior Member
Join Date: Apr 2010
Location: Germany
Old 06-21-2010 , 16:43   Re: Unload plugins per server on a multiple server setup
Reply With Quote #12

Thank you for giving me a short example.
Though I would prefer using 'Multiple or Forked Servers (SourceMod)' because that is more appealing to me unless there is an clear advantage by using symlinks. Care to shortly elaborate on that?
BentByBogus is offline
Reply



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 03:33.


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