SRCDS Steam group


multiple game server on a server
#1
Hi, i rent a dedicate server and i would like to rent 2-3 css server.

Ive been reading janne message: http://forums.srcds.com/viewtopic/10860 post #2.

I would like an update on this please: i use fedora linux.

my steam is on : /opt/srcds with css install

I have 2 client (they want to rent 1 css server each). So i use 2 username
1- /home/client1
2- /home/client2

In my situation do you think the janne option is good for me?

Here what he is doing:

-----------------------------------------------------------------------

Create a user & folder for the shared content.
Code:
sudo useradd -d/home/srcds -m srcds

Make a default srcds installation in that folder as user srcds.
Also if you want put some extra maps and plugins you need to be common for all servers. (if so, don't to edit maplist.txt etc...)

Then create the first user
Code:
sudo useradd -d/home/user1 -m user1

and as root create symbolic links from srcds
Code:
sudo cp -s -R /home/srcds/* /home/user1/

and replace user editable files with a fresh copy of their own
Code:
sudo rm /home/user1/cstrike/cfg/*
sudo rm /home/user1/cstrike/*.txt
sudo rm /home/user1/cstrike/*.db
sudo cp /home/srcds/cstrike/cfg/* /home/user1/cstrike/cfg/
sudo cp /home/srcds/cstrike/*.txt /home/user1/cstrike/
sudo cp /home/srcds/cstrike/*.db /home/user1/cstrike/


and set proper permissions for directories
Code:
sudo find /home/user1/ -type d -exec chown user1.user1 {} \;

and files
Code:
sudo chown user1.user1 /home/user1/cstrike/cfg/*
sudo chown user1.user1 /home/user1/cstrike/*.txt
sudo chown user1.user1 /home/user1/cstrike/*.db


the add user1 to group srcds so it can read its files
Code:
sudo usermod -a -Gsrcds user1 (-G srcds i suppose)



Repeat the user process for more servers.

All updates will this way only be needed on the shared content.
All users can edit their own configs and install new maps and plugins which wasn't part of the shared content.

-----------------------------------------------------------------------

For css i need to modify the directory for /orangebox/cstrike i think


So is there anything miss in this and everything good ? what you think about this?

Thank you for your help
Reply
#2
What about skins?
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#3
What about skins? what do you mean ?
Reply
#4
Server side skins that you ahve to put in the materials folder, and map models
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#5
and as root create symbolic links from srcds
Code:
sudo cp -s -R /home/srcds/* /home/user1/


can user1 modify files inside srcds with a symbolic links ? because if yes its not good because user2 will have the modify version of user1 ... right ?


pengy: is there any way to add this folder and map models ?
Reply
#6
All you really should sym link is everything in the srcds folder, except for the cstrike folder.
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#7
Just to be sure. the user will NOT be able to modify the sym link files and folder ?

Thanks
Reply
#8
As long as you set the owner as someone else and set the chmod to 750
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#9
Thanks pengy.

Anyone that hosting some game server can tell me how they install it please ? I would like to be sure its the best way before starting it.

Thanks
Reply
#10
Code:
cd /home/$1
mkdir srcds_l
cd srcds_l
if [ $game == "tf" ] || [ $game == "dod" ];then
mkdir orangebox
ln -s -n /default/Games/srcds_l/hl2 /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/InstallRecord.blob /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/orangebox/hl2 /home/$1/srcds_l/orangebox/
ln -s -n /default/Games/srcds_l/orangebox/srcds* /home/$1/srcds_l/orangebox/
cp -R /default/Games/srcds_l/orangebox/bin /home/$1/srcds_l/orangebox/
cp -R /default/Games/srcds_l/orangebox/$game /home/$1/srcds_l/orangebox/
elif [ $game == "left4dead" ];then
mkdir l4d
ln -s -n /default/Games/srcds_l/InstallRecord.blob /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/l4d/hl2 /home/$1/srcds_l/l4d/
cp -R /default/Games/srcds_l/l4d/bin /home/$1/srcds_l/l4d/
cp -R /default/Games/srcds_l/l4d/$game /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/InstallRecord.blob /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/installscript.vdf /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/srcds_run /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/srcds_i486 /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/platform /home/$1/srcds_l/l4d/
ln -s -n /default/Games/srcds_l/l4d/left4dead_* /home/$1/srcds_l/l4d/
else
ln -s -n /default/Games/srcds_l/hl2 /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/InstallRecord.blob /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/srcds_amd /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/srcds_i486 /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/srcds_i686 /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/srcds_run /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/test1.so /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/test2.so /home/$1/srcds_l/
ln -s -n /default/Games/srcds_l/test3.so /home/$1/srcds_l/
cp -R /default/Games/srcds_l/bin /home/$1/srcds_l/
cp -R /default/Games/srcds_l/$dir /home/$1/srcds_l/
if [ $game == "bg2" ];then
  cp -R /default/Games/srcds_l/hl2mp /home/$1/srcds_l/
fi
fi
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#11
Whoo nice information.

Just to be sure about the $1. why you pick this? its for a variable (like my user1, user2, etc ? just curious.

Any other directory or files to symlink for dods and css?
Reply
#12
yes its a variable for the user.
$dir is the game for cstrike
$game is only needed to specify, dods, tf2, or l4d
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#13
Ok i starting to install it and here the first line :

[root@cl-t044-262cl dods_1]# ln -s -n /opt/srcds/hl2 /home/user1/dods/
ln: target `/home/user1/dods/' is not a directory: No such file or directory

the dods folder is alreay created. Something i forget ?
Reply
#14
add these lines to the beginning
Code:
my $1 = user1
my $game = dod
Thats for dods
Code:
my $1 = user2
my $dir = cstrike
Thats for css
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
Reply
#15
Hey little question. is ln -s and cp -s doing the exactly the same thing?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)