views:

36

answers:

2

Hey Guys,

I'm not a server guru (unfortunately) but have a decent knowledge of linux & bsd. I'm trying to symlink multiple instances of HLDS (game server) but need to exclude certain folders & config files to achieve this properly. I need to do it this way as HLDS loads many mods automatically, and putting an exception to disable the mods doesnt work for all of them.

so basically i want:

/home/user/hlds-install (the base install)
/home/user/server1
/home/user/server2
etc...

and then be able to manually put any configs/mods ive excluded into the server dir's so that each server can be configured individually.

Can anyone tell me how to do this, perhaps some sort of bash script so that I can just change the targets to run it each time i want to create a new one. I have quite a number to make so doing the whole thing manually for each one definately isn't an option and im all for working smarter, not harder!

Thanks :)

+1  A: 

You can't symlink directories and exclude certain files. However, you could create symbolic links to all of the application's subdirectories and shared files inside each app dir, excluding the files that need to vary per-instance. Then you could use distinct files for the configuration files. More likely, there might be a way to run multiple instances of your application from the same binary but point it at different configuration directories or files.

Peter Lyons
thanks Peter :)I can run multiple instances and reference different configuration files - but with the way hlds works, there are some addons that load automatically which you cant comment to unload. but looks like the only way to do it is as you've said, to make it recursive
Jarrod White
+1  A: 

You could look into unionfs and mount the shared directories like that, and then stack on top of them the configuration files.

Also, there are a couple of FUSE file systems that do that.

miedwar