File: screen_and_cron_example

package info (click to toggle)
cube2 0.0.20201227%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 5,448 kB
  • sloc: cpp: 76,148; ansic: 24,923; makefile: 949; sh: 16
file content (18 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Running the server with cron and screen
---------------------------------------

You can run the server in a screen(1) session and from a cron @reboot action.
This can be used to run multiple instances of the server; you'll need to set
a different serverport for each server. It is recommended to create a different user
and server-init.cfg for each server and to disable shell access by pointing the shell
to /bin/false.

To achieve this, you could put something like this in the cube2 user's
crontab:

    @reboot screen -d -m -S ffa /usr/games/cube2-server -q/home/cube2


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

    @reboot cube2 screen -d -m -S ffa /usr/games/cube2-server -q/home/cube2