003 File Manager
Current Path:
/usr/src/contrib/unbound/contrib
usr
/
src
/
contrib
/
unbound
/
contrib
/
📁
..
📄
README
(3.49 KB)
📄
aaaa-filter-iterator.patch
(14.98 KB)
📁
android
📄
build-unbound-localzone-from-hosts.pl
(1.18 KB)
📄
create_unbound_ad_servers.cmd
(1.1 KB)
📄
create_unbound_ad_servers.sh
(1.02 KB)
📄
drop-tld.diff
(3.13 KB)
📄
drop2rpz
(1009 B)
📄
fastrpz.patch
(106.8 KB)
📁
ios
📄
libunbound.pc.in
(416 B)
📄
libunbound.so.conf
(2.03 KB)
📄
metrics.awk
(10.13 KB)
📄
parseunbound.pl
(5.58 KB)
📄
patch_rsamd5_enable.diff
(542 B)
📄
rc_d_unbound
(586 B)
📄
redirect-bogus.patch
(12.57 KB)
📁
selinux
📄
unbound-fuzzers.tar.bz2
(1.61 KB)
📄
unbound-fuzzme.patch
(6.43 KB)
📄
unbound-host.nagios.patch
(3.17 KB)
📄
unbound-querycachedb.py
(2.71 KB)
📄
unbound.init
(3.45 KB)
📄
unbound.init_fedora
(2.77 KB)
📄
unbound.plist
(926 B)
📄
unbound.service.in
(3.43 KB)
📄
unbound.socket.in
(142 B)
📄
unbound.spec
(3.79 KB)
📄
unbound.spec_fedora
(14.83 KB)
📄
unbound_cache.cmd
(2.56 KB)
📄
unbound_cache.sh
(3.38 KB)
📄
unbound_cacti.tar.gz
(71.5 KB)
📄
unbound_munin_
(17.57 KB)
📄
unbound_portable.service.in
(1.38 KB)
📄
unbound_smf23.tar.gz
(4.54 KB)
📄
update-anchor.sh
(4.25 KB)
📄
validation-reporter.sh
(2.27 KB)
📄
warmup.cmd
(2.47 KB)
📄
warmup.sh
(2.13 KB)
Editing: validation-reporter.sh
#!/bin/sh # validation reporter - reports validation failures to a collection server. # Copyright NLnet Labs, 2010 # BSD license. ### # Here is the configuration for the validation reporter # it greps the failure lines out of the log and sends them to a server. # The pidfile for the reporter daemon. pidfile="/var/run/validation-reporter.pid" # The logfile to watch for logged validation failures. logfile="/var/log/unbound.log" # how to notify the upstream # nc is netcat, it sends tcp to given host port. It makes a tcp connection # and writes one log-line to it (grepped from the logfile). # the notify command can be: "nc the.server.name.org 1234" # the listening daemon could be: nc -lk 127.0.0.1 1234 >> outputfile & notify_cmd="nc localhost 1234" ### # Below this line is the code for the validation reporter, # first the daemon itself, then the controller for the daemon. reporter_daemon() { trap "rm -f \"$pidfile\"" EXIT tail -F $logfile | grep --line-buffered "unbound.*info: validation failure" | \ while read x; do echo "$x" | $notify_cmd done } ### # controller for daemon. start_daemon() { echo "starting reporter" nohup $0 rundaemon </dev/null >/dev/null 2>&1 & echo $! > "$pidfile" } kill_daemon() { echo "stopping reporter" if test -s "$pidfile"; then kill `cat "$pidfile"` # check it is really dead if kill -0 `cat "$pidfile"` >/dev/null 2>&1; then sleep 1 while kill -0 `cat "$pidfile"` >/dev/null 2>&1; do kill `cat "$pidfile"` >/dev/null 2>&1 echo "waiting for reporter to stop" sleep 1 done fi fi } get_status_daemon() { if test -s "$pidfile"; then if kill -0 `cat "$pidfile"`; then return 0; fi fi return 1; } restart_daemon() { kill_daemon start_daemon } condrestart_daemon() { if get_status_daemon; then echo "reporter ("`cat "$pidfile"`") is running" exit 0 fi start_daemon exit 0 } status_daemon() { if get_status_daemon; then echo "reporter ("`cat "$pidfile"`") is running" exit 0 fi echo "reporter is not running" exit 1 } case "$1" in rundaemon) reporter_daemon ;; start) start_daemon ;; stop) kill_daemon ;; restart) restart_daemon ;; condrestart) condrestart_daemon ;; status) status_daemon ;; *) echo "Usage: $0 {start|stop|restart|condrestart|status}" exit 2 ;; esac exit $?
Upload File
Create Folder