diff options
author | schmonz <schmonz@pkgsrc.org> | 2005-01-26 07:01:10 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2005-01-26 07:01:10 +0000 |
commit | 51287c42742f1e04917169a0bde317bea50bde8a (patch) | |
tree | 356faf5e87088faac1ba0d040f7ddca652a8fd8d /net | |
parent | 7409c95091de3ba1805f1e93aef4386c0f6be68f (diff) | |
download | pkgsrc-51287c42742f1e04917169a0bde317bea50bde8a.tar.gz |
Add rc.d script, user account, and instructions for rbldns. Bump version.
Diffstat (limited to 'net')
-rw-r--r-- | net/djbdns-run/MESSAGE | 10 | ||||
-rw-r--r-- | net/djbdns-run/Makefile | 8 | ||||
-rw-r--r-- | net/djbdns-run/files/rbldns.sh | 52 |
3 files changed, 64 insertions, 6 deletions
diff --git a/net/djbdns-run/MESSAGE b/net/djbdns-run/MESSAGE index 40ae92caf7f..b9f63c2d5e5 100644 --- a/net/djbdns-run/MESSAGE +++ b/net/djbdns-run/MESSAGE @@ -1,5 +1,5 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.1.1.1 2004/09/01 20:13:04 schmonz Exp $ +$NetBSD: MESSAGE,v 1.2 2005/01/26 07:01:10 schmonz Exp $ Please read ${PREFIX}/share/doc/djbdns-run/README.pkgsrc. @@ -10,8 +10,7 @@ Cache for the local machine: - Run "echo nameserver 127.0.0.1 > /etc/resolv.conf". UDP name service: -- Set tinydns=YES in /etc/rc.conf. -- Set tinydns_ip to a suitable IP address of the local machine. +- Set tinydns=YES in /etc/rc.conf and tinydns_ip to a suitable IP address. - Create ${PKG_SYSCONFDIR}/tinydns/data with suitable contents. - Run "${RCD_SCRIPTS_DIR}/tinydns cdb". @@ -19,4 +18,9 @@ TCP name service: - Enable UDP name service. - Set axfrdns=YES in /etc/rc.conf. +RBL name service: +- Set rbldns=YES in /etc/rc.conf and rbldns_ip to a suitable IP address. +- Create ${PKG_SYSCONFDIR}/rbldns/data with suitable contents. +- Run "${RCD_SCRIPTS_DIR}/rbldns cdb". + =========================================================================== diff --git a/net/djbdns-run/Makefile b/net/djbdns-run/Makefile index b19109f58b3..c04db5d1f70 100644 --- a/net/djbdns-run/Makefile +++ b/net/djbdns-run/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2004/12/29 16:35:41 schmonz Exp $ +# $NetBSD: Makefile,v 1.6 2005/01/26 07:01:10 schmonz Exp $ # -DISTNAME= djbdns-run-20041229 +DISTNAME= djbdns-run-20050126 CATEGORIES= net MASTER_SITES= # empty DISTFILES= # empty @@ -24,13 +24,15 @@ INSTALL_EXTRA_TMPL+= ${PKGDIR}/INSTALL MAKE_DIRS+= ${PKG_SYSCONFDIR}/axfrdns MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/ip MAKE_DIRS+= ${PKG_SYSCONFDIR}/dnscache/servers +MAKE_DIRS+= ${PKG_SYSCONFDIR}/rbldns MAKE_DIRS+= ${PKG_SYSCONFDIR}/tinydns PKG_GROUPS= djbdns PKG_USERS+= dnslog:djbdns::dnslog PKG_USERS+= axfrdns:djbdns::axfrdns PKG_USERS+= dnscache:djbdns::dnscache +PKG_USERS+= rbldns:djbdns::rbldns PKG_USERS+= tinydns:djbdns::tinydns -RCD_SCRIPTS= axfrdns dnscache tinydns +RCD_SCRIPTS= axfrdns dnscache rbldns tinydns FILES_SUBST+= PKGNAME=${PKGNAME} INSTALLATION_DIRS= bin share/doc/djbdns-run diff --git a/net/djbdns-run/files/rbldns.sh b/net/djbdns-run/files/rbldns.sh new file mode 100644 index 00000000000..63499b6434e --- /dev/null +++ b/net/djbdns-run/files/rbldns.sh @@ -0,0 +1,52 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: rbldns.sh,v 1.1 2005/01/26 07:01:10 schmonz Exp $ +# +# @PKGNAME@ script to control rbldns (local RBL service) +# + +# PROVIDE: rbldns named +# REQUIRE: SERVERS +# BEFORE: DAEMON + +name="rbldns" + +# User-settable rc.conf variables and their default values: +rbldns_ip=${rbldns_ip-"127.0.0.3"} +rbldns_base=${rbldns_base-"rbl"} +rbldns_datalimit=${rbldns_datalimit-"250000"} +rbldns_logcmd=${rbldns_logcmd-"@LOCALBASE@/bin/setuidgid dnslog logger -t nb${name} -p daemon.info"} + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +rcvar=${name} +required_files="@PKG_SYSCONFDIR@/rbldns/data.cdb" +command="@LOCALBASE@/bin/${name}" +start_precmd="rbldns_precmd" +extra_commands="cdb" +cdb_cmd="rbldns_cdb" + +rbldns_precmd() +{ + command="@SETENV@ - ROOT=@PKG_SYSCONFDIR@/rbldns IP=${rbldns_ip} BASE=${rbldns_base} @LOCALBASE@/bin/envuidgid rbldns @LOCALBASE@/bin/softlimit -d ${rbldns_datalimit} @LOCALBASE@/bin/rbldns 2>&1 | ${rbldns_logcmd}" + command_args="&" + rc_flags="" +} + +rbldns_cdb() +{ + @ECHO@ "Reloading @PKG_SYSCONFDIR@/rbldns/data." + cd @PKG_SYSCONFDIR@/rbldns + @LOCALBASE@/bin/rbldns-data +} + +if [ -f /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + @ECHO_N@ " ${name}" + rbldns_precmd + eval ${command} ${rbldns_flags} ${command_args} +fi |