packages/net/unbound/files/unbound.init

47 lines
1.2 KiB
Text
Raw Normal View History

#!/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() {
# complex UCI work
unbound_start
# standard procd clause
procd_open_instance
procd_set_param command $PROG -d -c $UNBOUND_CONFFILE
procd_set_param respawn
procd_close_instance
}
##############################################################################
stop_service() {
unbound_stop
}
##############################################################################
service_triggers() {
procd_add_reload_trigger "dhcp" "network" "unbound"
}
##############################################################################