Fix ipfs id
This commit is contained in:
parent
654ca16983
commit
c23c431b8f
|
@ -730,6 +730,10 @@ function setup_ipfs {
|
||||||
rm -rf /home/$MY_USERNAME/.ipfs
|
rm -rf /home/$MY_USERNAME/.ipfs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /home/$MY_USERNAME/.ipfs-id ]; then
|
||||||
|
rm -f /home/$MY_USERNAME/.ipfs-id
|
||||||
|
fi
|
||||||
|
|
||||||
su -c "$IPFS_COMMAND init -b $IPFS_KEY_LENGTH" - $MY_USERNAME
|
su -c "$IPFS_COMMAND init -b $IPFS_KEY_LENGTH" - $MY_USERNAME
|
||||||
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
||||||
echo "IPFS could not be initialised for user $MY_USERNAME" >> $INSTALL_LOG
|
echo "IPFS could not be initialised for user $MY_USERNAME" >> $INSTALL_LOG
|
||||||
|
@ -737,7 +741,7 @@ function setup_ipfs {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MY_IPFS_ID=/home/$MY_USERNAME/.ipfs-id
|
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
|
su -c "echo \$($IPFS_COMMAND id | grep '\"ID\":' | awk -F '\"' '{print \$4}') > $MY_IPFS_ID" - $MY_USERNAME
|
||||||
if [ ! -f $MY_IPFS_ID ]; then
|
if [ ! -f $MY_IPFS_ID ]; then
|
||||||
echo 'No IPFS identity was created' >> $INSTALL_LOG
|
echo 'No IPFS identity was created' >> $INSTALL_LOG
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue