fix(scripts): fix default handling

fix #1663: made indicated reply defaults work correctly
This commit is contained in:
CoolCat467 2023-02-24 16:18:26 -06:00
parent f7f81e1bf4
commit ab8e372e83
3 changed files with 3 additions and 3 deletions

View file

@ -321,7 +321,7 @@ askreboot() {
printf "It is \\e[1mstrongly\\e[0m recommended to reboot "
printf "after un-installation.\\n"
read -p "Would you like to reboot now? [y/n]: " -n 1 -r
read -p "Would you like to reboot now? [y/N]: " -n 1 -r
echo

View file

@ -106,7 +106,7 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do
read -r -p "Confirm you want to disable ${CLIENT_NAME}? [Y/n] "
fi
if [[ "${REPLY}" =~ ^[Yy]$ ]]; then
if [[ "${REPLY}" =~ ^[Yy]$ ]] || [[ -z "${REPLY}" ]]; then
# Disable the peer section from the server config
echo "${CLIENT_NAME}"

View file

@ -106,7 +106,7 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do
read -r -p "Confirm you want to enable ${CLIENT_NAME}? [Y/n] "
fi
if [[ "${REPLY}" =~ ^[Yy]$ ]]; then
if [[ "${REPLY}" =~ ^[Yy]$ ]] || [[ -z "${REPLY}" ]]; then
# Enable the peer section from the server config
echo "${CLIENT_NAME}"