]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
unbound: Do not try removing forwarders when unbound is not running
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Nov 2016 12:26:34 +0000 (12:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Nov 2016 12:28:23 +0000 (12:28 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/init.d/unbound

index 01a560d4044ebc2fd4914c0e43287fe5d50854d5..1ecbf229ea711fe04eed59e27b5ea1f7c2d61a19 100644 (file)
@@ -366,6 +366,11 @@ case "$1" in
                ;;
 
        update-forwarders)
+               # Do not try updating forwarders when unbound is not running
+               if ! pgrep unbound &>/dev/null; then
+                       exit 0
+               fi
+
                update_forwarders
                ;;