summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2022-08-25 15:34:25 +0300
committerAdrian Perez de Castro2022-08-25 15:34:25 +0300
commitbd99918b1e63cf5c1d1d275fa3690e27295154d1 (patch)
tree0de0127e190b1c954f160b94b11b9928056b55fb
parentd2ef53ac46d586b68dea29cb4d9ea691919d34ff (diff)
downloadaur-bd99918b1e63cf5c1d1d275fa3690e27295154d1.tar.gz
Fix and tighten systemd service unit
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD4
-rw-r--r--dqcache@.service17
3 files changed, 17 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 79480935c4b0..59e0db240bdd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dq
pkgdesc = Small recursive DNS server and tools with DNSCurve support
pkgver = 20220822
- pkgrel = 4
+ pkgrel = 6
url = https://mojzis.com/software/dq/
install = dq.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 2fc8bddb5624..0c609719648b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adrian Perez <aperez@igalia.com>
pkgname=dq
pkgver=20220822
-pkgrel=4
+pkgrel=6
pkgdesc='Small recursive DNS server and tools with DNSCurve support'
url=https://mojzis.com/software/dq/
arch=(x86_64 i686)
@@ -35,6 +35,8 @@ package () {
install -m 644 -D LICENCE.md \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENCE.md"
+ install -m 755 -d "${srcdir}/etc/dqcache/default/dump"
+
install -m 644 -D "${srcdir}/default.conf" \
"${pkgdir}/etc/dqcache/default.conf"
install -m 644 -D "${srcdir}/root-servers" \
diff --git a/dqcache@.service b/dqcache@.service
index f1292f61b304..8928c34c2578 100644
--- a/dqcache@.service
+++ b/dqcache@.service
@@ -6,12 +6,21 @@ After=network.target
[Service]
Type=simple
Restart=always
-PrivateTmp=true
+StandardError=journal
+StandardOutput=journal
PrivateDevices=true
-ProtectSystem=true
+PrivateTmp=true
+ProtectClock=true
+ProtectHome=true
+ProtectControlGroups=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectSystem=strict
+ReadWritePaths=/etc/dqcache/%i/dump
WorkingDirectory=/etc/dqcache/%i
-EnvironmentFile=-/etc/dqcache/%i.conf
-EnvironmentFile=/etc/dqcache/%i/config
+EnvironmentFile=/etc/dqcache/%i.conf
+EnvironmentFile=-/etc/dqcache/%i/config
+ExecStartPre=/usr/bin/mkdir -p /etc/dqcache/%i/dump
ExecStart=/usr/bin/dqcache-start /etc/dqcache/%i dqcache /usr/bin/dqcache
[Install]