| 1 |
OpenArena dedicated server for Debian |
| 2 |
===================================== |
| 3 |
|
| 4 |
Running one server instance |
| 5 |
--------------------------- |
| 6 |
|
| 7 |
The openarena-server init script runs a dedicated server as the user |
| 8 |
"Debian-openarena". This is a simple setup suitable for running one server |
| 9 |
on a machine; by default it will run a deathmatch server. |
| 10 |
|
| 11 |
The Debian-openarena user's home directory is /var/games/openarena-server, |
| 12 |
and the equivalent of ~/.openarena for the default server is |
| 13 |
/var/games/openarena-server/server.oa. |
| 14 |
|
| 15 |
By default, the init script will use etc/openarena-server/server.cfg, |
| 16 |
which is a symlink to /etc/openarena-server/server.cfg. You can edit |
| 17 |
this file, or put an alternative configuration in |
| 18 |
/var/games/openarena-server/server.oa/baseoa and change |
| 19 |
/etc/default/openarena-server to exec that. |
| 20 |
|
| 21 |
The whole /etc/openarena-server directory is symlinked into the engine's |
| 22 |
search path as etc/openarena-server, so you can place files there and |
| 23 |
exec them with commands like "/exec etc/openarena-server/ctf.cfg". |
| 24 |
|
| 25 |
The server can be managed in the usual way, e.g. via service(8) |
| 26 |
and update-rc.d(8) commands like |
| 27 |
|
| 28 |
service openarena-server stop |
| 29 |
service openarena-server start |
| 30 |
update-rc.d openarena-server disable |
| 31 |
update-rc.d openarena-server enable |
| 32 |
|
| 33 |
which should work for all of Debian's supported init systems. |
| 34 |
|
| 35 |
Running multiple server instances with systemd |
| 36 |
---------------------------------------------- |
| 37 |
|
| 38 |
Under systemd, openarena-server supports additional instances of the server, |
| 39 |
so you can run a deathmatch server and a Capture the Flag server, or |
| 40 |
a vanilla OpenArena server and an Excessive Plus server. |
| 41 |
|
| 42 |
Each instance [email protected] has configuration and state in |
| 43 |
/var/games/openarena-server/INSTANCE.oa, and will execute |
| 44 |
/etc/openarena-server/INSTANCE.cfg on startup. |
| 45 |
|
| 46 |
To set a parameter that can only be given on the command line, such as |
| 47 |
fs_game or net_port, you can create /etc/default/openarena-server@INSTANCE |
| 48 |
or a systemd "drop-in" file, and set DAEMON_OPTS there. Setting a |
| 49 |
unique net_port for each server is recommended: if you do not, each |
| 50 |
server will try ports above its configured net_port until it finds one |
| 51 |
that is not in use, so the mapping between servers and ports will be arbitrary. |
| 52 |
|
| 53 |
The instance name "server" cannot be used without disabling and stopping |
| 54 |
openarena-server.service, since it shares its configuration with that |
| 55 |
service. |
| 56 |
|
| 57 |
For instance, these shell commands (as root) would set up a Capture the |
| 58 |
Flag server on port 27970: |
| 59 |
|
| 60 |
cat > /etc/default/openarena-server@ctf |
| 61 |
DAEMON_OPTS="+set net_port 27970" |
| 62 |
EOF |
| 63 |
cat > /etc/openarena-server/ctf.cfg <<EOF |
| 64 |
sv_hostname "My Capture the Flag Server" |
| 65 |
g_gametype 4 |
| 66 |
map islandctf |
| 67 |
EOF |
| 68 |
systemctl daemon-reload |
| 69 |
systemctl enable [email protected] |
| 70 |
systemctl start [email protected] |