From 6cbaa7dd1391ad22914fad16ed42d0734289a0c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Dec 2015 10:26:18 +0000 Subject: [PATCH] Tidy key sharing --- src/freedombone-backup-remote | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 46902c87..f288d5ca 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -418,10 +418,12 @@ function disperse_key_shares { cp $share_filename $temp_key_share_fragments/ # copy the fragments directory to the remote server - /usr/bin/sshpass -p "$REMOTE_PASSWORD" scp -r -P $REMOTE_SSH_PORT $temp_key_share_fragments $REMOTE_SERVER + /usr/bin/sshpass -p "$REMOTE_PASSWORD" \ + scp -r -P $REMOTE_SSH_PORT $temp_key_share_fragments $REMOTE_SERVER if [ ! "$?" = "0" ]; then # Send a warning email - echo "Key share to $REMOTE_SERVER failed" | mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS + echo "Key share to $REMOTE_SERVER failed" | \ + mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS fi # remove the temp file/directory @@ -429,7 +431,8 @@ function disperse_key_shares { rm -rf $temp_key_share_dir # Send a confirmation email - echo "Key shared to $REMOTE_SERVER" | mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS + echo "Key ${share_filename} shared to $REMOTE_SERVER" | \ + mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS fi fi fi