From b9ebbac57042eaf706e8d60c33a3eb5c5fd4447d Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Fri, 30 Aug 2024 21:56:19 +0100 Subject: [PATCH] Check the confirmation option in wipe-mailbox --- roles/queue/files/wipe-mailbox.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/queue/files/wipe-mailbox.sh b/roles/queue/files/wipe-mailbox.sh index b12b0934..07e95cc3 100644 --- a/roles/queue/files/wipe-mailbox.sh +++ b/roles/queue/files/wipe-mailbox.sh @@ -28,6 +28,11 @@ if [ -z "${mailbox}" ]; then exit 2 fi +if [ $confirm -ne 1 ]; then + echo "You did not pass the confirmation option --yes-i-am-sure!" >&2 + exit 1 +fi + set -euo pipefail # Get the list of mailboxes in an array. -- GitLab