packages/net/unbound/files/unbound.init
Eric Luehrsen c9e5929ff9 Unbound: Update scripts to build conf file from UCI
-unbound.sh implements the majority of requirements in README.md
-rootzone.sh reloads a small subset for alternate trigger maintenance
-unbound.init sets procd triggers on Unbound and dnsmasq (dhcp) UCI
-two part commit squashed with Makefile included

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-11-29 20:49:46 -05:00

46 lines
1.2 KiB
Bash
Executable file

#!/bin/sh /etc/rc.common
##############################################################################
#
# 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() {
unbound_prepare
procd_open_instance
procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
procd_set_param respawn
procd_close_instance
}
##############################################################################
stop_service() {
rootzone_update
}
##############################################################################
service_triggers() {
procd_add_reload_trigger "dhcp"
procd_add_reload_trigger "network"
procd_add_reload_trigger "unbound"
}
##############################################################################