1 #!/bin/sh /etc/rc.common
2 ##############################################################################
4 # Copyright (C) 2016 Michael Hanselmann, Eric Luehrsen
6 ##############################################################################
8 # This init script is just the entry point for Unbound UCI.
10 ##############################################################################
15 PROG
=/usr
/sbin
/unbound
17 ##############################################################################
19 .
/usr
/lib
/unbound
/unbound.sh
21 ##############################################################################
28 ##############################################################################
31 if [ -n "$UNBOUND_BOOT" ] ; then
32 # Load procd triggers (rc) and use event IFUP to really start
39 # standard procd clause
41 procd_set_param
command $PROG -d -c $UNBOUND_CONFFILE
42 procd_set_param respawn
46 ##############################################################################
51 # Wait! on restart Unbound may take time writing closure stats to syslog
52 pidof
$PROG && sleep 1
55 ##############################################################################
58 # use soft reload to prevent continuous stop-start and cache flush
59 procd_add_reload_trigger
"unbound"
60 procd_add_raw_trigger
"interface.*.up" 2000 /etc
/init.d
/unbound reload
63 ##############################################################################