From f483f9ae4d0a95f5fcd9ae610bc5f43ff734c4be Mon Sep 17 00:00:00 2001 From: Henry N Date: Sat, 4 Apr 2020 20:49:14 +0200 Subject: [PATCH] removeUnbound: without reatsrt before uninstall Not need to restart unbound, if it would be complete uninstalled later. Move the restart into the else condition. --- openvpn-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index a9f1a03..2b7c646 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -1130,7 +1130,6 @@ function removeUnbound () { # Remove OpenVPN-related config sed -i 's|include: \/etc\/unbound\/openvpn.conf||' /etc/unbound/unbound.conf rm /etc/unbound/openvpn.conf - systemctl restart unbound until [[ $REMOVE_UNBOUND =~ (y|n) ]]; do echo "" @@ -1157,6 +1156,7 @@ function removeUnbound () { echo "" echo "Unbound removed!" else + systemctl restart unbound echo "" echo "Unbound wasn't removed." fi