From d7f477ca9f99119470d933b94f85a4332c261513 Mon Sep 17 00:00:00 2001 From: Daniel Heitmann Date: Tue, 26 Aug 2014 18:54:22 +0200 Subject: [PATCH 1/3] added systemd unit for easier server-deployment --- q3a.service | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 q3a.service diff --git a/q3a.service b/q3a.service new file mode 100644 index 00000000..4a31572b --- /dev/null +++ b/q3a.service @@ -0,0 +1,21 @@ +[Unit] +Description=This service spawns a ioquake3 dedicated server with sane defaults +# However, these defaults may not apply to all use cases. +# See comments below for further details + +[Service] +User=q3a +ExecStart=/usr/local/games/ioquake3/ioq3ded.x86_64 +set net_port 27960 +set fs_game cpma +set dedicated 2 +set sv_pure 1 +set com_hunkmegs 128 +exec server.cfg +Restart=on-abort +# there are several options to tweak the server's performance: +# net_port defines the UDP-port used for connections to the server +# fs_game should be the mod you want to play. Not necessary for vanilla-q3/FFA +# dedicated 0 and 1 are LAN, 1 is Internet +# sv_pure 1 prevents clients from using their own pk3-files +# com_hunkmegs defaults to 56, should be 128/192/256 on a modern system(?) +# rate 25000 defines the rate in which client & server communicate +# snaps 40 defines gamestate-snapshots client & server exchange in secs +# cl_maxpackets 125 max amount of FPS being counted on the server-side + +[Install] +WantedBy=multi-user.target From d77515470c131331511240053ba3b7157615fcd1 Mon Sep 17 00:00:00 2001 From: Daniel Heitmann Date: Wed, 27 Aug 2014 01:21:18 +0200 Subject: [PATCH 2/3] removed a few defaults to make it completely usable out of the box --- q3a.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/q3a.service b/q3a.service index 4a31572b..88ec16d5 100644 --- a/q3a.service +++ b/q3a.service @@ -5,7 +5,7 @@ Description=This service spawns a ioquake3 dedicated server with sane defaults [Service] User=q3a -ExecStart=/usr/local/games/ioquake3/ioq3ded.x86_64 +set net_port 27960 +set fs_game cpma +set dedicated 2 +set sv_pure 1 +set com_hunkmegs 128 +exec server.cfg +ExecStart=/usr/local/games/ioquake3/ioq3ded.x86_64 +set dedicated 2 +set sv_pure 1 Restart=on-abort # there are several options to tweak the server's performance: # net_port defines the UDP-port used for connections to the server From c082b7bb2bb55c514f872722c4ca5a29071f5d12 Mon Sep 17 00:00:00 2001 From: Daniel Heitmann Date: Wed, 27 Aug 2014 15:16:35 +0200 Subject: [PATCH 3/3] removed absolute path to binary, removed sv_pure parameter --- q3a.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/q3a.service b/q3a.service index 88ec16d5..d37c7f16 100644 --- a/q3a.service +++ b/q3a.service @@ -5,12 +5,12 @@ Description=This service spawns a ioquake3 dedicated server with sane defaults [Service] User=q3a -ExecStart=/usr/local/games/ioquake3/ioq3ded.x86_64 +set dedicated 2 +set sv_pure 1 +ExecStart=$(which ioq3ded.x86_64) +set dedicated 2 Restart=on-abort # there are several options to tweak the server's performance: # net_port defines the UDP-port used for connections to the server # fs_game should be the mod you want to play. Not necessary for vanilla-q3/FFA -# dedicated 0 and 1 are LAN, 1 is Internet +# dedicated 0 is non-dedicted an not available with ioq3ded, 1 is LAN, 2 is Internet # sv_pure 1 prevents clients from using their own pk3-files # com_hunkmegs defaults to 56, should be 128/192/256 on a modern system(?) # rate 25000 defines the rate in which client & server communicate