From 38f6898fabe5d0954bed1b965a9217679b5b43d7 Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Sun, 14 May 2017 13:26:33 +0000 Subject: [PATCH] net-dns/pdns-recursor: Update init script Package-Manager: Portage-2.3.5, Repoman-2.3.2 --- net-dns/pdns-recursor/files/pdns-recursor-r1 | 37 +++++++++ .../pdns-recursor-4.0.4-r1.ebuild | 75 +++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 net-dns/pdns-recursor/files/pdns-recursor-r1 create mode 100644 net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild diff --git a/net-dns/pdns-recursor/files/pdns-recursor-r1 b/net-dns/pdns-recursor/files/pdns-recursor-r1 new file mode 100644 index 000000000000..57c9df1eaa45 --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-r1 @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}" + +PDNS_CONFIG="${PDNS_CONFIGDIR}/recursor.conf" +PDNS_CHROOTDIR="$( awk -F = '$1 == "chroot" { print $2 }' "${PDNS_CONFIG}" )" +PDNS_SOCKETDIR="$( awk -F = '$1 == "socket-dir" { print $2 }' "${PDNS_CONFIG}" )" +[ -z "${PDNS_SOCKETDIR}" -a -z "${PDNS_CHROOTDIR}" ] && PDNS_SOCKETDIR="/var/run" + +name="PowerDNS Recursor" +description="Recursive name server" + +extra_started_commands="ping" +description_ping="Ping the PowerDNS instance" + +command="/usr/sbin/pdns_recursor" +command_args="--config-dir=${PDNS_CONFIGDIR}" +command_args_foreground="--daemon=no" +command_args_background="--daemon=yes" +yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1" + +pidfile="${PDNS_CHROOTDIR}/${PDNS_SOCKETDIR}/pdns_recursor.pid" + +control_command="/usr/bin/rec_control" +control_command_args="${command_args}" + +depend() { + need net +} + +ping() { + ebegin "Pinging ${name}" + ${control_command} ${control_command_args} ping >/dev/null 2>&1 + eend $? +} diff --git a/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild new file mode 100644 index 000000000000..b748e27b710e --- /dev/null +++ b/net-dns/pdns-recursor/pdns-recursor-4.0.4-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit toolchain-funcs flag-o-matic eutils versionator + +DESCRIPTION="The PowerDNS Recursor" +HOMEPAGE="https://www.powerdns.com/" +SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="lua luajit protobuf systemd" +REQUIRED_USE="?? ( lua luajit )" + +DEPEND="lua? ( >=dev-lang/lua-5.1:= ) + luajit? ( dev-lang/luajit:= ) + protobuf? ( + dev-libs/protobuf + >=dev-libs/boost-1.42 + ) + systemd? ( sys-apps/systemd:0= ) + >=dev-libs/boost-1.35" +RDEPEND="${DEPEND} + !