summaryrefslogtreecommitdiffstats
path: root/debian/knot.service
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:24:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:24:08 +0000
commitec8c51d7bcb5f87ae93298975306d7272bae9f8c (patch)
tree93a50b5d547533c9931c3e0739b24b717f94912a /debian/knot.service
parentAdding upstream version 3.2.6. (diff)
downloadknot-debian.tar.xz
knot-debian.zip
Adding debian version 3.2.6-1.debian/3.2.6-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/knot.service')
-rw-r--r--debian/knot.service31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/knot.service b/debian/knot.service
new file mode 100644
index 0000000..54ab197
--- /dev/null
+++ b/debian/knot.service
@@ -0,0 +1,31 @@
+[Unit]
+Description=Knot DNS server
+Wants=network-online.target
+After=network-online.target
+Documentation=man:knotd(8) man:knot.conf(5) man:knotc(8)
+
+[Service]
+EnvironmentFile=/etc/default/knot
+Type=notify
+User=knot
+Group=knot
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETPCAP
+AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_SETPCAP
+ExecStartPre=/usr/sbin/knotc conf-check
+ExecStart=/usr/sbin/knotd -m "$KNOT_CONF_MAX_SIZE" $KNOTD_ARGS
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+LimitNOFILE=1048576
+TimeoutStopSec=300
+# Extend the systemd startup timeout by this value (seconds) for each zone
+Environment="KNOT_ZONE_LOAD_TIMEOUT_SEC=180"
+# Maximum size (MiB) of a configuration database
+Environment="KNOT_CONF_MAX_SIZE=512"
+
+# Expected systemd >= v239
+RuntimeDirectory=knot
+StateDirectory=knot
+NoNewPrivileges=yes
+
+[Install]
+WantedBy=multi-user.target