aboutsummaryrefslogtreecommitdiff
path: root/dns/powerdns-recursor
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-07-03 15:12:31 +0000
committerChris Rees <crees@FreeBSD.org>2011-07-03 15:12:31 +0000
commit501ee714ab5623e6333ac288c218b95f687e4501 (patch)
treefdf6218dbbdbf52d5cad5137c2966ef419f7cf0f /dns/powerdns-recursor
parentd2e4a5a9e07ed2383d08ea0d7af7a4395abf3579 (diff)
downloadports-501ee714ab5623e6333ac288c218b95f687e4501.tar.gz
ports-501ee714ab5623e6333ac288c218b95f687e4501.zip
Notes
Diffstat (limited to 'dns/powerdns-recursor')
-rw-r--r--dns/powerdns-recursor/Makefile8
-rw-r--r--dns/powerdns-recursor/pkg-deinstall19
-rw-r--r--dns/powerdns-recursor/pkg-install32
3 files changed, 2 insertions, 57 deletions
diff --git a/dns/powerdns-recursor/Makefile b/dns/powerdns-recursor/Makefile
index 0a744ca74029..75f275527fd3 100644
--- a/dns/powerdns-recursor/Makefile
+++ b/dns/powerdns-recursor/Makefile
@@ -41,6 +41,8 @@ USE_RC_SUBR+= pdns-recursor
.if defined(WITH_SETUID)
EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-setuid
+USERS= pdns_recursor
+GROUPS= pdns
.endif
.if defined(WITH_LUA)
@@ -71,12 +73,6 @@ post-patch:
@${REINPLACE_CMD} -e 's;"/etc/powerdns/";"${PREFIX}/etc/pdns/";' \
${WRKSRC}/config.h
-.if defined(WITH_SETUID)
-pre-install:
- @${ECHO} "==> Creating custom user to run pdns_recursor..."
- @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-.endif
-
post-install:
.if !exists(${PREFIX}/etc/pdns/recursor.conf)
${INSTALL_DATA} ${PREFIX}/etc/pdns/recursor.conf-dist \
diff --git a/dns/powerdns-recursor/pkg-deinstall b/dns/powerdns-recursor/pkg-deinstall
deleted file mode 100644
index 6a235b2fc88f..000000000000
--- a/dns/powerdns-recursor/pkg-deinstall
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-PDNSUSER=${PDNSUSER:-pdns_recursor}
-PDNSUID=${PDNSUID:-120}
-PDNSGROUP=${PDNSGROUP:-pdns}
-PDNSGID=${PDNSGID:-120}
-
-if pw groupshow "$PDNSGROUP" 2>/dev/null 1>&2; then
- echo "To delete the PowerDNS group permanently, use 'pw groupdel ${PDNSGROUP}'"
-fi
-
-if pw usershow "$PDNSUSER" 2>/dev/null 1>&2; then
- echo "To delete the PowerDNS user permanently, use 'pw userdel ${PDNSUSER}'"
-fi
-exit 0
diff --git a/dns/powerdns-recursor/pkg-install b/dns/powerdns-recursor/pkg-install
deleted file mode 100644
index 8177e29e7cd1..000000000000
--- a/dns/powerdns-recursor/pkg-install
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
-
-PDNSUSER=${PDNSUSER:-pdns_recursor}
-PDNSUID=${PDNSUID:-120}
-PDNSGROUP=${PDNSGROUP:-pdns}
-PDNSGID=${PDNSGID:-120}
-
-if ! pw groupshow "$PDNSGROUP" 2>/dev/null 1>&2; then
- if pw groupadd $PDNSGROUP -g $PDNSGID; then
- echo "=> Added group \"$PDNSGROUP\"."
- else
- echo "=> Adding group \"$PDNSGROUP\" failed..."
- exit 1
- fi
-fi
-
-if ! pw usershow "$PDNSUSER" 2>/dev/null 1>&2; then
- if pw useradd $PDNSUSER -u $PDNSUID -g $PDNSGROUP -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "pdns_recursor pseudo-user"; \
- then
- echo "=> Added user \"$PDNSUSER\"."
- else
- echo "=> Adding user \"$PDNSUSER\" failed..."
- exit 1
- fi
-fi
-exit 0