From 1312a89095fd600f2f598da88079939cea4be3e0 Mon Sep 17 00:00:00 2001 From: angristan Date: Sat, 15 Sep 2018 20:23:03 +0200 Subject: [PATCH] Improve remove unbound question --- openvpn-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index e59679b..10d709b 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -365,9 +365,11 @@ if [[ -e /etc/openvpn/server.conf ]]; then rm ${UNBOUND_CONF_D}/openvpn.conf - read -rp "Do you want to remove Unbound, too? [y/n]: " -e REMOVE + until [[ $REMOVE_UNBOUND == "y" || $REMOVE_UNBOUND == "n" ]]; do + read -rp "Do you want to remove Unbound, too? [y/n]: " -e REMOVE_UNBOUND + done - if [[ "$REMOVE" = 'y' ]]; then + if [[ "$REMOVE_UNBOUND" = 'y' ]]; then if [[ "$OS" = 'debian' ]]; then apt-get autoremove --purge -y unbound elif [[ "$OS" = 'arch' ]]; then