From: Stefan Schantl Date: Sat, 11 Jan 2020 18:36:29 +0000 (+0100) Subject: initscripts/unbound: Add support for reload the service X-Git-Tag: v2.25-core141~70^2~14 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=0c1094770a727b2c269c5c7c88eabd4ee9d01dcd initscripts/unbound: Add support for reload the service Signed-off-by: Stefan Schantl --- 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