Setting up a Nexuiz server

Post anything on anything here

Moderator: Moderators

Postby Sxen » Sun Nov 05, 2006 10:14 am

Hi

1. How do I run Nexuiz as a service? Right now, I am SSHing into the server and running the server, but when I close the terminal, the Nexuiz server stops. I thought that adding & to the end of the command caused it to be a background running process, but it's still attached to the terminal session because when I close it, the process dies. Do I need to setup a script under /rc/init.d?


There are several possibilities. What we are doing on delight is using the "screen" package, which provides a virtual terminal where you can detach and attach everytime. The start script then looks like

Code: Select all
nexserv@boron nexserv]$ cat startserver.sh
#!/bin/bash
cd ~/Nexuiz
screen -S NEXUIZ-SERVER -m -d ./nexuiz-dedicated +exec server.cfg +rcon_password `cat ~/.rconpass`


This creates a screen session "NEXUIZ-SERVER" and immediately detaches from it. You can reattach using "screen -r NEXUIZ-SERVER".

The rcon-Password thing allows us to have the rcon-Password in a file named ".rconpass" in the home directory of the user the server is running under. We use this from several scripts for various purposes.

With our setup, the servers don't automatically restart after a system reboot. Someone actually has to log into the box and restart the servers. But since Reboots of the machine are so infrequent, this is currently not a major concern. One possible solution to this would be a cron job which checks for running servers every hour and then restarts them (if you know eggdrop irc bots, the "botchk" script works exactly like this)

2. How do I get the names of the maps to setup the maplist properly....

Code: Select all
set "g_maplist" "'facing_worlds_nex_b1k''ctf_facing_worlds_nex'"


You need to prefix the game mode to the map, i.e. if the bsp name is "facing_worlds_nex_b1k" and the other "randomexample", use:

Code: Select all
set "g_maplist" "'ctf_facing_worlds_nex_b1k''ctf_randomexample'"


Sxen
DCC's Delight Public Server: http://delight.vapor.com/
Sxen
Member
 
Posts: 48
Joined: Mon Aug 28, 2006 8:12 am

Postby Dokujisan » Sun Nov 05, 2006 11:42 am

Excellent.

I installed the screen package using Yum and I'm using that to launch the Nexuiz server.

Now I need to figure out how to successfully enable downloading of maps. It shows the default URL map downloads pointing to Nexuiz.org. Do I need to setup a web location for maps that are not on the Nexuiz server?

Am I right in thinking that the settings on this page

http://www.alientrap.org/wiki/pmwiki.ph ... GameTweaks

that begin with "sv_" are server settings?

Someone suggested that I need to set playerskins to full bright in order to use the Facing Worlds maps. How do I do that?

Anyone happen to know the gravity setting on Herforst?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby esteel » Sun Nov 05, 2006 12:30 pm

The easiest way to get all the mapcfg names is to start Nexuiz, open the console and enter
Code: Select all
log_file mapcfgs.txt
dir maps/*.mapcfg
log_file ""

All the available files are then shown in the console and are written to the file data/mapcfgs.txt. You then just need to add the name without the .mapcfg to g_maplist.

The default download url is YET of no real use. Its planned to create a small databank and a mirror network so authors, admins and players have an easy way of getting maps (published). Right now you have to get some webspace were you can download the map directly and either adjust the default download url to that or create a file named data/curl_urls.txt as its descriped in Docs/mapdownload.txt. An example can be found here: http://141.2.16.3:7780/nex/maps/attic/curl_urls.txt
But as divVerents server should not get all the traffic its a good idea to setup an own download mirror if possible!!

My suggestion with 'pure' was not per map but for the server in general.. but will if help if only 2 servers do so? :)

For the fullbright players use g_fullbrightplayers 1 and its also shown in the example server config Docs/server/server.cfg.

An other way to start a nexuiz server is to look at how the scripts inside /etc/init.d work, to create one for Nexuiz and to link it into the runlevel dirs /etc/rcX.d..
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Dokujisan » Sun Nov 05, 2006 8:44 pm

Excellent!
I almost have a usable server.

Do I edit the mapcfg files inside the .pk3 files? Or do I place new mapcfg files in the /data/maps folder to override what is stored in the .pk3?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby KadaverJack » Sun Nov 05, 2006 9:07 pm

Dokujisan wrote:Do I edit the mapcfg files inside the .pk3 files? Or do I place new mapcfg files in the /data/maps folder to override what is stored in the .pk3?

Both will work, but placing the modified mapcfgs in data/maps is less work and makes it easier to edit them later... And you don't have to worry, that updates might replaces your mapcfgs.
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Dokujisan » Sun Nov 05, 2006 10:22 pm

I am using screen to launch the server

Code: Select all
screen -S NEXUIZ-SERVER -m -d ./server_linux.sh


and I use this command to reattach to the screen

Code: Select all
screen -r NEXUIZ-SERVER


At this point, how do I release the screen again so I can close my terminal window? I looked through the man pages on screen but couldn't figure it out.
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby KadaverJack » Sun Nov 05, 2006 10:49 pm

Dokujisan wrote:At this point, how do I release the screen again so I can close my terminal window? I looked through the man pages on screen but couldn't figure it out.

Code: Select all
       C-a d
       C-a C-d     (detach)      Detach screen from this terminal.

Other useful key bindings
C-a c opens a new window
C-a [0-9] selects a window (by it's number)
C-a C-a toggles to previously displayed window
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Dokujisan » Mon Nov 06, 2006 6:50 am

Holy crap...you all answered every single question that I asked!

I'm used to seeing "RTFM!!!" in response to questions on the internet. It's rare to see people that enjoy helping others. I appreciate it greatly.

Are you sure you guys are Linux users? ;-)
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby divVerent » Mon Nov 06, 2006 7:29 am

Yes, but we were too lazy to type RTFM.

We however do have a big RTFM sign we can hold up... :P

Seriously... here in Europe, Sunday, the 29th of October was the DOTFM - "Day of TFM". We are recovering from that... ;) You want to know what DOTFM really is? It's an event that takes place twice a year - and on these days, you walk around in your home, hunt down clocks showing the wrong time and set the time on them. You need the manuals for some of them... that is, if you find them... :P
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Dokujisan » Mon Nov 06, 2006 8:14 am

Can I run a second server on a different port by executing the server with a different cfg?
Something like...

Code: Select all
screen -S NEXUIZ-SERVER2 -m -d ./nexuiz-dedicated +exec server2.cfg


This would be for testing purposes.
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron