[quake] 06/10: add native systemd units
Simon McVittie
smcv at debian.org
Wed Feb 4 11:07:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository quake.
commit 8d58baa9b2359bab8353f0a248443a7b9ba90b0e
Author: Simon McVittie <smcv at debian.org>
Date: Mon Jan 26 11:21:14 2015 +0000
add native systemd units
---
debian/changelog | 1 +
debian/control | 4 +++-
debian/quake-server.service | 21 +++++++++++++++++++++
debian/quake2-server.service | 21 +++++++++++++++++++++
debian/quake3-server.service | 21 +++++++++++++++++++++
debian/rules | 2 +-
6 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e0fc8dc..a106f4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ quake (10) UNRELEASED; urgency=medium
- put default for DAEMON_OPTS in /etc/init.d/quake*-server so it can
operate without /etc/default/quake*-server
- "+exec etc/quake*-server/server.cfg" is no longer part of DAEMON_OPTS
+ - add native systemd units
* quake3: prefer to load game data from /usr/lib/quake3/base
or /usr/lib/quake3/ta, where ioquake3 can provide native-code game modules
- this requires ioquake3 (>= 1.36+u20150114+dfsg1-1~) and
diff --git a/debian/control b/debian/control
index 0a59130..18b40af 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,9 @@ Uploaders: David Banks <amoebae at gmail.com>,
Jack Coulter <jscinoz at gmail.com>
Section: contrib/games
Priority: optional
-Build-Depends: debhelper (>= 9)
+Build-Depends:
+ debhelper (>= 9),
+ dh-systemd,
Build-Depends-Indep: imagemagick,
inkscape,
xcftools,
diff --git a/debian/quake-server.service b/debian/quake-server.service
new file mode 100644
index 0000000..55895c4
--- /dev/null
+++ b/debian/quake-server.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Quake game server
+After=network.target
+
+[Service]
+Type=simple
+User=quake-server
+Environment=DAEMON_OPTS=
+EnvironmentFile=-/etc/default/quake-server
+ExecStart=/usr/games/quake-server $DAEMON_OPTS +exec etc/quake-server/server.cfg
+Restart=on-failure
+RestartPreventExitStatus=72
+# hardening
+NoNewPrivileges=true
+PrivateDevices=true
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=full
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/quake2-server.service b/debian/quake2-server.service
new file mode 100644
index 0000000..1284c7d
--- /dev/null
+++ b/debian/quake2-server.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Quake II game server
+After=network.target
+
+[Service]
+Type=simple
+User=quake2-server
+Environment=DAEMON_OPTS=
+EnvironmentFile=-/etc/default/quake2-server
+ExecStart=/usr/games/quake2-server $DAEMON_OPTS +exec debian_server.cfg
+Restart=on-failure
+RestartPreventExitStatus=72
+# hardening
+NoNewPrivileges=true
+PrivateDevices=true
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=full
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/quake3-server.service b/debian/quake3-server.service
new file mode 100644
index 0000000..e8e2364
--- /dev/null
+++ b/debian/quake3-server.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Quake III Arena game server
+After=network.target
+
+[Service]
+Type=simple
+User=Debian-quake3
+Environment=DAEMON_OPTS=
+EnvironmentFile=-/etc/default/quake3-server
+ExecStart=/usr/games/quake3-server +set com_homepath server.q3a $DAEMON_OPTS +exec etc/quake3-server/server.cfg
+Restart=on-failure
+RestartPreventExitStatus=72
+# hardening
+NoNewPrivileges=true
+PrivateDevices=true
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=full
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index 2d33f6a..d1decc8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,4 @@
#!/usr/bin/make -f
%:
- dh $@
+ dh $@ --with=systemd
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/quake.git
More information about the Pkg-games-commits
mailing list