Merge pull request #1697 from CoolCat467/master

fix(scripts): made indicated reply defaults work correctly
This commit is contained in:
4s3ti 2023-02-25 00:01:04 +01:00 committed by GitHub
commit f1d0d974b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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}"