diff --git a/shared/attmail.py b/shared/attmail.py index 4c8af04..6403c91 100755 --- a/shared/attmail.py +++ b/shared/attmail.py @@ -26,7 +26,7 @@ msg["Subject"] = subject # Add body to email body = "This is an example of how you can send a boarding pass in attachment with Python" msg.attach(MIMEText(body, "plain")) -filename = "/var/tmp/keys.zip" +filename = "/var/tmp/keys.tar" # Open PDF file in binary mode # We assume that the file is in the directory where you run your Python script from with open(filename, "rb") as attachment: diff --git a/shared/sendkeys b/shared/sendkeys index ac178cd..e600507 100755 --- a/shared/sendkeys +++ b/shared/sendkeys @@ -29,9 +29,9 @@ then echo "$0: email the below to requestor" echo "--------------------------------" cat ${KEYSTORE}/*.pub |sort | uniq - zip /var/tmp/keys.zip ~/.mykeys/_*.pub + tar -cvf /var/tmp/keys.tar ~/.mykeys/_*.pub python3 ${BASE}/shared/attmail.py - rm -f /var/tmp/keys.zip + rm -f /var/tmp/keys.tar else echo "ERROR: keystore not found" fi