From 0c1094770a727b2c269c5c7c88eabd4ee9d01dcd Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 11 Jan 2020 19:36:29 +0100 Subject: [PATCH] initscripts/unbound: Add support for reload the service Signed-off-by: Stefan Schantl --- src/initscripts/system/unbound | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 68309bbfdb..b5f7cbc602 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -597,6 +597,22 @@ case "$1" in sleep 1 $0 start ;; + reload) + # Update configuration files + write_tuning_conf + write_forward_conf + + # Update Safe Search rules if the system is online. + if [ -e "/var/ipfire/red/active" ]; then + update_safe_search + fi + + # Update hosts. + update_hosts + + # Call unbound-control and perform the reload + /usr/sbin/unbound-control -q reload + ;; status) statusproc /usr/sbin/unbound @@ -625,7 +641,7 @@ case "$1" in ;; *) - echo "Usage: $0 {start|stop|restart|status|resolve|update-forwarders|remove-forwarders|update-safe-search}" + echo "Usage: $0 {start|stop|restart|reload|status|resolve|update-forwarders|remove-forwarders|update-safe-search}" exit 1 ;; esac -- 2.39.2