Suggested-by: hexumg <hexumg@gmail.com>
Bug: https://bugs.gentoo.org/606644
--- /dev/null
+[Unit]
+Description=Knot high-performance DNS Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/knotd
+ExecReload=/usr/sbin/knotc reload
+ExecStop=/usr/sbin/knotc stop
+PrivateTmp=true
+User=knot
+Group=knot
+RuntimeDirectory=knot
+RuntimeDirectoryMode=750
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target
)
idn? ( || ( net-dns/libidn >=net-dns/libidn2-2.0.0 ) )
dev-libs/libedit
- systemd? ( sys-apps/systemd )
+ systemd? ( >=sys-apps/systemd-229 )
"
DEPEND="${RDEPEND}
virtual/pkgconfig
keepdir /var/lib/${PN}
newinitd "${FILESDIR}/knot.init" knot
- systemd_dounit "${FILESDIR}/knot.service"
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/knot-1.service" knot
+ fi
find "${D}" -name '*.la' -delete || die
}