3 # $NetBSD: rbldns.sh,v 1.1 2005/01/26 07:01:10 schmonz Exp $
5 # @PKGNAME@ script to control rbldns (local RBL service)
8 # PROVIDE: rbldns named
14 # User-settable rc.conf variables and their default values:
15 : ${rbldns_postenv:=""}
16 : ${rbldns_ip:="127.0.0.3"}
17 : ${rbldns_base:="rbl"}
18 : ${rbldns_datalimit:="250000"}
19 : ${rbldns_log:="YES"}
20 : ${rbldns_logcmd:="logger -t nb${name} -p daemon.info"}
21 : ${rbldns_nologcmd:="@LOCALBASE@/bin/multilog -*"}
23 if [ -f /etc
/rc.subr
]; then
28 required_files
="@PKG_SYSCONFDIR@/rbldns/data.cdb"
29 command="@LOCALBASE@/bin/${name}"
30 start_precmd
="rbldns_precmd"
31 extra_commands
="reload cdb"
32 reload_cmd
="rbldns_cdb"; cdb_cmd
=${reload_cmd}
36 if [ -f /etc
/rc.subr
]; then
37 checkyesno rbldns_log || rbldns_logcmd
=${rbldns_nologcmd}
39 command="@SETENV@ - ${rbldns_postenv} 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 | @LOCALBASE@/bin/setuidgid dnslog ${rbldns_logcmd}"
46 @ECHO@
"Reloading @PKG_SYSCONFDIR@/rbldns/data."
47 cd @PKG_SYSCONFDIR@
/rbldns
48 @LOCALBASE@
/bin
/rbldns-data
51 if [ -f /etc
/rc.subr
]; then
57 eval ${command} ${rbldns_flags} ${command_args}