Ensure that only fragments are listed

This commit is contained in:
Bob Mottram 2015-07-03 23:35:57 +01:00
parent f2cab5c7e1
commit 0f4039d608
2 changed files with 2 additions and 2 deletions

View File

@ -3818,7 +3818,7 @@ function backup_to_friends_servers {
echo " if [ -d /home/$MY_USERNAME/.gnupg_fragments ]; then" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [ $REMOTE_DOMAIN ]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo " cd /home/$MY_USERNAME/.gnupg_fragments" >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' no_of_shares=$(ls -afq keyshare* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' no_of_shares=$(ls -afq keyshare.asc.* | wc -l)' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' no_of_shares=$((no_of_shares - 2))' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' if [[ ${no_of_shares} > 0 ]]; then' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME
echo ' # Pick a share index based on the domain name' >> /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME

View File

@ -127,7 +127,7 @@ fi
# was anything downloaded?
cd $FRAGMENTS_DIR
no_of_shares=$(ls -afq keyshare* | wc -l)
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
no_of_shares=$((no_of_shares - 2))
if [[ ${no_of_shares} == 0 ]]; then
echo 'No key fragments were retrieved'