Tidy key sharing
This commit is contained in:
parent
a8eb9c5360
commit
6cbaa7dd13
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue