Title: How to run multiple games? Post by: fufinha on December 24, 2008, 03:48:30 PM I got a new server and have problems with the file system since 0.7.6
How do i run multiple servers with the same fs_game name. I set fs_homepath on each server, they are unique so they don't interfere. But downloading occurs twice if I have two servers running. Also I have the white space issue again, on the new server. I spoke to jack thompson and he has it also. Only Cacatoes replied when I had problems with this ages ago.. I am guessing this happens on every server but doesn't affect their processes. Happens to me on Fedora and Debian. 16:49 ? 00:05:59 . oa_ded.i386 +set cvar_restart +set ... would be good to get a response, please Title: Re: How to run multiple games? Post by: Cacatoes on December 24, 2008, 06:03:48 PM Me again :D
On a unique machine, I run multiple servers with the same fs_game, but they run under the same user account, and so they use the same fs_homepath. Maybe I misunderstood your problem, but, Client-side, how can it download twice the same thing ? Does it erase the previous pk3 ? Still no idea about this space, do you have a clue if a recent build of ioq3 (without OA diff patch) has it ? This dot and space appears too on Tuxfamily servers, would there be much work to adapt your scripts ? Title: Re: How to run multiple games? Post by: fufinha on December 24, 2008, 06:55:20 PM suprise \:D/
re: fs_game.. aah I never thought about the user account thing. :D That maybe an option. I only need one folder but if I run different servers then what do specify so that the config is generated in a specific location? I also think I have the folders in /usr/local/games/oa (i pressed tab typing that :O ) So maybe the game is reading the game location folders and thats why it requests the both of them, a bit like this... ./oa/modname/ ./oa/anotherfolder/modname/ (set by fs_homepath) Yes the download repeats twice, with same file name shown. If the file changes then you will see it as a tmp file so I dont get the repeating thing.. (like what happens if the two files differ) I suspected the whitespace affected everyone too but i was hoping for a fix. It affects quite alot of scripts available for gameserver management. :( I got someone to build it for me and.. same issue. Title: Re: How to run multiple games? Post by: damocles on December 24, 2008, 06:58:04 PM Maybe there's something in the code or the build process that affects the process name (e.g. setproctitle). What about the vanilla sources?
Title: Re: How to run multiple games? Post by: Cacatoes on December 25, 2008, 03:02:55 AM Here are the scripts I use to start the server :
I run 2 servers, and so 2 scripts. ~/start-server1.sh Code: #!/bin/sh The main thing which differs in ~/start-server2.sh is : Code: +exec server1.cfg Now the script I use to shut down servers : Code: #!/bin/sh Quote I also think I have the folders in /usr/local/games/oa (i pressed tab typing that :O ) Request that feature to firefox ;) (or google chrome will steal it)Now about file location, you shouldn't have mods installed twice (even if it's a symbolic link). My /opt/openarena is rather empty : only files of the standard game, right after unzipping. Then I have my "oa" user home folder, ~/.openarena Inside of it, I have mods : Code: oa@loverchy:~/.openarena$ ls And inside baseoa, I have most pk3 files, and config files : Code: oa@loverchy:~/.openarena/baseoa$ ls Title: Re: How to run multiple games? Post by: dash9 on December 25, 2008, 04:02:49 AM You could have something like:
Code: pidfilename=/home/loverchy/.oa/$name Then the script to shut down the servers would "know" exactly what process id to kill. Code: if [[ -f $pidfilename ]]; then ..but if your script works, you don't have much reason to change it, do you? :D Title: Re: How to run multiple games? Post by: Cacatoes on December 25, 2008, 04:58:08 AM Quote ..but if your script works, you don't have much reason to change it, do you? Right, but it's always nice to learn about more elegant ways ;)I learned shell at school some time ago but I'm no good sysadmin. :'-] Title: Re: How to run multiple games? Post by: fufinha on December 25, 2008, 05:35:01 AM thank you :D
I'll try this on the new server. Title: Re: How to run multiple games? Post by: fufinha on December 25, 2008, 09:14:01 AM I looked at it a bit more and this is the way I've always set up q3 servers.
All the mods run nicely in the home folder and didnt need to care about the main game folder except putting maps in baseq3. So I tried this and I think it's loaded without the map. Where do you have your server config and does the screen name mean user name/owner of the process? I want to keep this the same. thank you :D Title: Re: How to run multiple games? Post by: Cacatoes on December 25, 2008, 11:03:37 AM Quote Where do you have your server config It's in ~/.openarena/baseoa/ Quote does the screen name mean user name/owner of the process? It's arbitrary, you can name it "oa_server_one". [ I just noticed "screen" command isn't available on my personnal machine ; maybe you'll have to install it if you want to run that script ] If you're curious you can list screen sessions with : Code: screen -ls Title: Re: How to run multiple games? Post by: fufinha on December 25, 2008, 05:45:40 PM Thank you Cacatoes, I got it working. :D
I think this also clears up something else where some of the maps are saving in my baseoa in the home folder (on the client). You may have put map in the mod folder instead of /opt/baseoa/ ? Since I've cleaned my entire system I can see that the maps in my document home baseoa are from you. :D I did have to delete my mod folder as I was getting some vm error.. but after removing the mod folder I only downloaded the files once and started up clean Title: Re: How to run multiple games? Post by: sago007 on December 25, 2008, 05:57:10 PM [ I just noticed "screen" command isn't available on my personnal machine ; maybe you'll have to install it if you want to run that script ] If you use dash9's trick and save the pid you can use "nohup" instead of screen. It can possible save a small amount of resources by not having to emulate an VT100 terminal. You cannot reconnect to a nohup process (as far as I know) so you will need the pid to kill it.Title: Re: How to run multiple games? Post by: fufinha on December 25, 2008, 07:48:13 PM I think I have something like this.. the brutal method :D
ps -ef | grep 27960 | grep oa_ded | grep -v root | awk '{print $2}' | xargs kill $2 Title: Re: How to run multiple games? Post by: fufinha on December 27, 2008, 05:59:54 AM sago do you get the white space issue too?
I have reinstalled and moved server trying to fix this. I wouldnt have needed to if I knew this was a bug Title: Re: How to run multiple games? Post by: sago007 on December 27, 2008, 06:11:39 AM sago do you get the white space issue too? I do also have a white space on my server. |