From f3eddccee8f9bbf6d0ad3b598d3cf10336342c69 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 26 Dec 2020 23:34:54 +0000 Subject: [PATCH] wording and exit code --- scripts/wireguard/removeCONF.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/wireguard/removeCONF.sh b/scripts/wireguard/removeCONF.sh index 414b492..44e4b03 100755 --- a/scripts/wireguard/removeCONF.sh +++ b/scripts/wireguard/removeCONF.sh @@ -68,7 +68,7 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do echo -e "::: \e[1m${CLIENT_NAME}\e[0m does not exist" else REQUESTED="$(sha256sum "configs/${CLIENT_NAME}.conf" | cut -c 1-64)" - read -r -p "Do you really want to delete $CLIENT_NAME? [Y/n] " + read -r -p "Do you really want to delete $CLIENT_NAME? [y/N] " if [[ $REPLY =~ ^[Yy]$ ]]; then @@ -115,6 +115,9 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do fi fi + else + echo "Aborting operation" + exit 1 fi fi