Just pass through if ipfs fails

It can be fixed later
This commit is contained in:
Bob Mottram 2016-08-15 22:52:58 +01:00
parent 9107240519
commit b8545e61f4
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 3 additions and 3 deletions

View File

@ -731,21 +731,21 @@ function setup_ipfs {
su -c "$IPFS_COMMAND init -b $IPFS_KEY_LENGTH" - $MY_USERNAME
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
echo "IPFS could not be initialised for user $MY_USERNAME" >> $INSTALL_LOG
exit 7358
return
fi
MY_IPFS_ID=/home/$MY_USERNAME/.ipfs-id
su -c "echo $($IPFS_COMMAND id | grep '\"ID\":' | awk -F '\"' '{print $4}') > $MY_IPFS_ID" - $MY_USERNAME
if [ ! -f $MY_IPFS_ID ]; then
echo 'No IPFS identity was created' >> $INSTALL_LOG
exit 37895
return
fi
IPFS_PEER_ID=$(cat $MY_IPFS_ID)
if [ ${#IPFS_PEER_ID} -lt 10 ]; then
echo 'Invalid IPFS peer ID' >> $INSTALL_LOG
echo "$IPFS_PEER_ID" >> $INSTALL_LOG
exit 74782
return
fi
# TODO in avahi service for ipfs replace IPFS_PEER_ID