summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Retornaz <caseoffr@outlook.com>2018-04-25 21:56:18 +0200
committerAnthony G. Basile <blueness@gentoo.org>2018-04-25 20:26:38 -0400
commitf3cafd190f4b4632ccac19b6fde6e8f948eeb34e (patch)
treefbb254db69762abe18f13fa70ee3cc6e56f020f5 /net-dns/getdns
parentwww-apache/mod_access_dnsbl: fix HOMEPAGE. (diff)
downloadgentoo-f3cafd190f4b4632ccac19b6fde6e8f948eeb34e.tar.gz
gentoo-f3cafd190f4b4632ccac19b6fde6e8f948eeb34e.tar.bz2
gentoo-f3cafd190f4b4632ccac19b6fde6e8f948eeb34e.zip
net-dns/getdns: add systemd unit files
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'net-dns/getdns')
-rw-r--r--net-dns/getdns/files/stubby.systemd12
-rw-r--r--net-dns/getdns/files/stubby.tmpfilesd2
-rw-r--r--net-dns/getdns/getdns-1.4.1-r1.ebuild (renamed from net-dns/getdns/getdns-1.4.1.ebuild)4
3 files changed, 17 insertions, 1 deletions
diff --git a/net-dns/getdns/files/stubby.systemd b/net-dns/getdns/files/stubby.systemd
new file mode 100644
index 000000000000..b85b8e90b036
--- /dev/null
+++ b/net-dns/getdns/files/stubby.systemd
@@ -0,0 +1,12 @@
+[Unit]
+Description=stubby DNS resolver
+
+[Service]
+WorkingDirectory=/run/stubby
+ExecStart=/usr/bin/stubby
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+User=stubby
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/getdns/files/stubby.tmpfilesd b/net-dns/getdns/files/stubby.tmpfilesd
new file mode 100644
index 000000000000..bf70492743ad
--- /dev/null
+++ b/net-dns/getdns/files/stubby.tmpfilesd
@@ -0,0 +1,2 @@
+# tmpfiles.d (5) for use with stubby.service
+d /run/stubby 0750 root stubby - -
diff --git a/net-dns/getdns/getdns-1.4.1.ebuild b/net-dns/getdns/getdns-1.4.1-r1.ebuild
index 699abdbc82fa..db4a0afb74a6 100644
--- a/net-dns/getdns/getdns-1.4.1.ebuild
+++ b/net-dns/getdns/getdns-1.4.1-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit user fcaps
+inherit user fcaps systemd
DESCRIPTION="Modern asynchronous DNS API"
HOMEPAGE="https://getdnsapi.net/"
@@ -52,6 +52,8 @@ src_install() {
if use stubby; then
newinitd "${FILESDIR}"/stubby.initd stubby
newconfd "${FILESDIR}"/stubby.confd stubby
+ systemd_newunit "${FILESDIR}"/stubby.systemd stubby.service
+ systemd_newtmpfilesd "${FILESDIR}"/stubby.tmpfilesd stubby.conf
fi
}