|
@@ -418,10 +418,12 @@ function disperse_key_shares {
|
418
|
418
|
cp $share_filename $temp_key_share_fragments/
|
419
|
419
|
|
420
|
420
|
# copy the fragments directory to the remote server
|
421
|
|
- /usr/bin/sshpass -p "$REMOTE_PASSWORD" scp -r -P $REMOTE_SSH_PORT $temp_key_share_fragments $REMOTE_SERVER
|
|
421
|
+ /usr/bin/sshpass -p "$REMOTE_PASSWORD" \
|
|
422
|
+ scp -r -P $REMOTE_SSH_PORT $temp_key_share_fragments $REMOTE_SERVER
|
422
|
423
|
if [ ! "$?" = "0" ]; then
|
423
|
424
|
# Send a warning email
|
424
|
|
- echo "Key share to $REMOTE_SERVER failed" | mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS
|
|
425
|
+ echo "Key share to $REMOTE_SERVER failed" | \
|
|
426
|
+ mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS
|
425
|
427
|
fi
|
426
|
428
|
|
427
|
429
|
# remove the temp file/directory
|
|
@@ -429,7 +431,8 @@ function disperse_key_shares {
|
429
|
431
|
rm -rf $temp_key_share_dir
|
430
|
432
|
|
431
|
433
|
# Send a confirmation email
|
432
|
|
- echo "Key shared to $REMOTE_SERVER" | mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS
|
|
434
|
+ echo "Key ${share_filename} shared to $REMOTE_SERVER" | \
|
|
435
|
+ mail -s "${PROJECT_NAME} social key management" $MY_EMAIL_ADDRESS
|
433
|
436
|
fi
|
434
|
437
|
fi
|
435
|
438
|
fi
|