File: quake-server.README.Debian

package info (click to toggle)
quake 2
  • links: PTS
  • area: contrib
  • in suites: wheezy
  • size: 184 kB
  • sloc: sh: 179; makefile: 53
file content (62 lines) | stat: -rw-r--r-- 2,579 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Quake dedicated server for Debian
=================================

Running the server via sysvinit
-------------------------------

By default, quake-server adds a user under which to run the dedicated server
(quake-server) and sets it up to be run by an init script in the conventional
Debian way. This is a simple setup suitable for running one server on a
machine; by default it will run a deathmatch game.

The quake-server user's home directory is /var/games/quake-server, so you
can find Quake files in /var/games/quake-server/.quakespasm,
/var/games/quake-server/.darkplaces or whatever.

By default, the init script will use
/usr/share/games/quake/id1/debian_server.cfg, which is a symlink to
/etc/quake-server/server.cfg. You can edit this file, or put an alternative
configuration in /var/games/quake-server/.quakespasm/id1 (or whatever is the
appropriate directory for your selected engine) and change
/etc/default/quake-server to exec that.

There are various alternative ways you can run the server if this doesn't
meet your requirements.

Disabling the init script
-------------------------

To stop the server:

    /etc/init.d/quake-server stop

To prevent it from running again, either edit /etc/default/quake-server
and set START_DAEMON to 0, or use update-rc.d:

    update-rc.d quake-server disable

Running the server with cron and screen
---------------------------------------

One alternative way to run the server is to run it in a screen(1) session
from a cron @reboot action. This can be used to run multiple instances
of the server; you'll need to set a different port number on each server after
the first, and it's safest to give each server a unique home directory so they
don't overwrite each other's configuration files.

To do this, you could put something like this in the quake-server user's
crontab (don't break the long lines!):

    @reboot screen -d -m -S ffa env HOME=/var/games/quake-server/ffa /usr/games/quake-server +exec ffa.config
    @reboot screen -d -m -S ctf env HOME=/var/games/quake-server/ctf /usr/games/quake-server -port 54321 +exec ctf.config

or in /etc/crontab or a file in /etc/cron.d:

    @reboot quake-server screen -d -m -S ffa env HOME=/var/games/quake-server/ffa /usr/games/quake-server +exec ffa.config
    @reboot quake-server screen -d -m -S ctf env HOME=/var/games/quake-server/ctf /usr/games/quake-server -port 54321 +exec ctf.config

If you do that, you can access the servers' consoles by attaching a screen
session to them:

    sudo -u quake-server screen -r ffa
    sudo -u quake-server screen -r ctf