aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfirma16
1 files changed, 14 insertions, 2 deletions
diff --git a/firma b/firma
index 16c6c30..0b3134e 100755
--- a/firma
+++ b/firma
@@ -904,6 +904,9 @@ function NewList {
while true; do
read -rep " List email address or 'quit' to exit: " LIST_ADDRESS
if [[ "$LIST_ADDRESS" == "quit" ]]; then
+ echo "Deleting folder $LIST_HOMEDIR..."
+ rm -rf $LIST_HOMEDIR
+ echo "List creation aborted."
exit 1
elif CheckValidEmail $LIST_ADDRESS; then
break
@@ -916,7 +919,10 @@ function NewList {
if [[ "$return_code" == "0" ]]; then
while true; do
read -rep " List administrator(s) email address(es) (space delimited) or 'quit' to exit: " LIST_ADMIN
- if [[ "$LIST_ADDRESS" == "quit" ]]; then
+ if [[ "$LIST_ADMIN" == "quit" ]]; then
+ echo "Deleting folder $LIST_HOMEDIR..."
+ rm -rf $LIST_HOMEDIR
+ echo "List creation aborted."
exit 1
else
for admin in $LIST_ADMIN; do
@@ -967,6 +973,9 @@ function NewList {
read -rep " Please choose a key size or 'quit' to exit: " answer
answer="$(echo $answer | tr '[:lower:]' '[:upper:]')"
if [[ "$answer" == "QUIT" ]]; then
+ echo "Deleting folder $LIST_HOMEDIR..."
+ rm -rf $LIST_HOMEDIR
+ echo "List creation aborted."
exit 1
elif [[ "$answer" == "1" || "$answer" == "1024" ]]; then
KEY_SIZE="1024"
@@ -1001,7 +1010,10 @@ function NewList {
KEY_EXPIRATION="0"
break
elif [[ "$KEY_EXPIRATION" == "quit" ]]; then
- return_code=1
+ echo "Deleting folder $LIST_HOMEDIR..."
+ rm -rf $LIST_HOMEDIR
+ echo "List creation aborted."
+ exit 1
elif [[ -z "$(echo $digits_only | sed -e 's/[0-9]//g')" || -n "$last_char" ]]; then
break
else