]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
initscripts/unbound: Add support for reload the service
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 11 Jan 2020 18:36:29 +0000 (19:36 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 11 Jan 2020 18:36:29 +0000 (19:36 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/initscripts/system/unbound

index 68309bbfdb5201c039777f8d5bf441e0ae0d8af5..b5f7cbc602cb7757a1501d17223a563824cae230 100644 (file)
@@ -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