Unbound: Incorporate hotplug/iface and root.key in tmpfs

-Patch for /etc/unbound/unbound.conf
--All work done in /var/lib/unbound/
--chroot or jail to /var/lib/unbound/
-Init script points to /usr/lib/unbound.sh
-Makefile to install new scripts in the package

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
This commit is contained in:
Eric Luehrsen
2016-10-20 00:17:23 -04:00
parent cb56829c98
commit 8dfd5d0b84
3 changed files with 53 additions and 29 deletions
+31 -13
View File
@@ -1,20 +1,38 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2016 Michael Hanselmann
START=61
##############################################################################
#
# Copyright (C) 2016 Michael Hanselmann, Eric Luehrsen
#
##############################################################################
#
# This init script is just the entry point for Unbound UCI.
#
##############################################################################
START=60
USE_PROCD=1
PROG=/usr/sbin/unbound
##############################################################################
. /usr/lib/unbound/unbound.sh
##############################################################################
start_service() {
find /etc/unbound \! \( -user unbound -group unbound \) \
-exec chown unbound:unbound {} \;
unbound_prepare
find /etc/unbound \( -perm +027 -o \! -perm -600 \) \
-exec chmod u=rwX,g=rX,o= {} \;
procd_open_instance
procd_set_param command /usr/sbin/unbound
procd_append_param command -d # don't daemonize
procd_set_param respawn
procd_close_instance
procd_open_instance
procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
procd_set_param respawn
procd_close_instance
}
##############################################################################
stop_service() {
rootzone_update
}
##############################################################################