OpenMoHAA dedicated server for Debian
=====================================

Running the server
------------------

Installing the openmohaa-server package provides a dedicated server
running as the user "_openmohaa-server".
This is a simple setup suitable for running one server on a machine.

By default, the server will use etc/openmohaa-server/server.cfg,
which is a symlink to /etc/openmohaa-server/server.cfg. You can edit
this file to reconfigure the default instance.

The equivalent of ~/.openmohaa for the server is
/var/games/openmohaa-server/server.openmohaa.

The server can be managed in the usual way, e.g. via service(8) commands
like

    service openmohaa-server stop
    service openmohaa-server start
    update-rc.d openmohaa-server disable
    update-rc.d openmohaa-server enable

which should work for all of systemd, sysvinit and upstart.

The whole /etc/openmohaa-server directory is symlinked into the engine's
search path as etc/openmohaa-server, so you can place files there and
execute them with commands like "exec etc/openmohaa-server/team.cfg".

Running multiple server instances with systemd
----------------------------------------------

Under systemd, openmohaa-server supports additional instances of the
server, for example for different game modes.

Each instance openmohaa-server@INSTANCE.service has configuration and
state in /var/games/openmohaa-server/INSTANCE.openmohaa, and will execute
/etc/openmohaa-server/INSTANCE.cfg on startup.

To set a parameter that can only be given on the command line, such as
net_port, you can create /etc/default/openmohaa-server@INSTANCE
or a systemd "drop-in" file, and set DAEMON_OPTS there. Setting a
unique net_port for each server is recommended: if you do not, each
server will try ports above its configured net_port until it finds one
that is not in use, so the mapping between servers and ports will be arbitrary.

The instance name "server" cannot be used without disabling and stopping
openmohaa-server.service, since it shares its configuration with that
service.
