diff -urN /usr/ports/dns/dnsdist.old/Makefile /usr/ports/dns/dnsdist/Makefile --- /usr/ports/dns/dnsdist.old/Makefile 2015-08-16 13:27:02.000000000 +0200 +++ /usr/ports/dns/dnsdist/Makefile 2015-08-22 10:49:13.711296000 +0200 @@ -2,7 +2,7 @@ # $FreeBSD: head/dns/dnsdist/Makefile 394402 2015-08-16 11:27:02Z amdmi3 $ PORTNAME= dnsdist -DISTVERSION= 0.0.211g05c8117 +DISTVERSION= 0.0.213g3172f9b CATEGORIES= dns net MASTER_SITES= http://builder.powerdns.com/files/dnsdist/dist/ @@ -23,7 +23,14 @@ USES= bison cpe gmake libtool lua:52 pkgconfig readline tar:bz2 INSTALL_TARGET= install-strip +USE_RC_SUBR= dnsdist + PLIST_FILES= bin/dnsdist \ - man/man1/dnsdist.1.gz + man/man1/dnsdist.1.gz \ + etc/dnsdist.conf.sample + +post-install: + ${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample \ + ${STAGEDIR}${PREFIX}/etc .include diff -urN /usr/ports/dns/dnsdist.old/distinfo /usr/ports/dns/dnsdist/distinfo --- /usr/ports/dns/dnsdist.old/distinfo 2015-08-16 13:27:02.000000000 +0200 +++ /usr/ports/dns/dnsdist/distinfo 2015-08-22 06:46:39.386182000 +0200 @@ -1,2 +1,2 @@ -SHA256 (dnsdist-0.0.211g05c8117.tar.bz2) = de08b642c0b5c1d2f6ff9900e8e043738789a1068a6283005136badaa8622305 -SIZE (dnsdist-0.0.211g05c8117.tar.bz2) = 539720 +SHA256 (dnsdist-0.0.213g3172f9b.tar.bz2) = fe0fa3c3f3c2633d2927b30f54fc92fded3c4dae7d354dde3df7fda3792c6abd +SIZE (dnsdist-0.0.213g3172f9b.tar.bz2) = 539680 diff -urN /usr/ports/dns/dnsdist.old/files/dnsdist.conf.sample /usr/ports/dns/dnsdist/files/dnsdist.conf.sample --- /usr/ports/dns/dnsdist.old/files/dnsdist.conf.sample 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/dns/dnsdist/files/dnsdist.conf.sample 2015-08-20 08:42:49.123647000 +0200 @@ -0,0 +1,6 @@ +newServer {address="2001:4860:4860::8888", qps=1} +newServer {address="2001:4860:4860::8844", qps=1} +newServer {address="2620:0:ccc::2", qps=10} +newServer {address="2620:0:ccd::2", qps=10} +newServer("192.168.1.2") +setServerPolicy(firstAvailable) -- first server within its QPS limit diff -urN /usr/ports/dns/dnsdist.old/files/dnsdist.in /usr/ports/dns/dnsdist/files/dnsdist.in --- /usr/ports/dns/dnsdist.old/files/dnsdist.in 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/dns/dnsdist/files/dnsdist.in 2015-08-18 22:39:32.234939000 +0200 @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dnsdist +# REQUIRE: NETWORKING DAEMON +# KEYWORD: shutdown +# +# Add the following to /etc/rc.conf to enable dnsdist: +# +# dnsdist_enable="YES" +# + +. /etc/rc.subr + +name="dnsdist" +rcvar="dnsdist_enable" + +load_rc_config ${name} + +: ${dnsdist_enable:="NO"} +: ${dnsdist_pidfile:=/var/run/${name}/pid} + +command=/usr/local/sbin/${name} +command_args="-l 127.0.0.1:53" + +run_rc_command "$1"