commit: f3cafd190f4b4632ccac19b6fde6e8f948eeb34e
Author: Quentin Retornaz <caseoffr <AT> outlook <DOT> com>
AuthorDate: Wed Apr 25 19:56:18 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 00:26:38 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3cafd19
net-dns/getdns: add systemd unit files
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
net-dns/getdns/files/stubby.systemd | 12 ++++++++++++
net-dns/getdns/files/stubby.tmpfilesd | 2 ++
.../getdns/{getdns-1.4.1.ebuild => getdns-1.4.1-r1.ebuild} | 4 +++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/net-dns/getdns/files/stubby.systemd
b/net-dns/getdns/files/stubby.systemd
new file mode 100644
index 00000000000..b85b8e90b03
--- /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 00000000000..bf70492743a
--- /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
similarity index 91%
rename from net-dns/getdns/getdns-1.4.1.ebuild
rename to net-dns/getdns/getdns-1.4.1-r1.ebuild
index 699abdbc82f..db4a0afb74a 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
}