Only list ipfs users who have a tox id
This commit is contained in:
parent
f09bb35ecf
commit
614906ad05
|
@ -799,6 +799,7 @@ function setup_ipfs {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make a public directory
|
# make a public directory
|
||||||
|
TOX_ID='none'
|
||||||
if [ -d /home/$MY_USERNAME/Desktop ]; then
|
if [ -d /home/$MY_USERNAME/Desktop ]; then
|
||||||
if [ ! -d /home/$MY_USERNAME/Public ]; then
|
if [ ! -d /home/$MY_USERNAME/Public ]; then
|
||||||
mkdir /home/$MY_USERNAME/Public
|
mkdir /home/$MY_USERNAME/Public
|
||||||
|
@ -811,9 +812,9 @@ function setup_ipfs {
|
||||||
exit 368225
|
exit 368225
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
TOX_ID=$(su -c 'toxid' - $MY_USERNAME)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TOX_ID=$(su -c 'toxid' - $MY_USERNAME)
|
|
||||||
create_avahi_mesh_service "ipfs" "ipfs" "udp" "$IPFS_PORT" "${IPFS_PEER_ID}:${TOX_ID}"
|
create_avahi_mesh_service "ipfs" "ipfs" "udp" "$IPFS_PORT" "${IPFS_PEER_ID}:${TOX_ID}"
|
||||||
|
|
||||||
echo "IPFS installed with ID ${IPFS_PEER_ID}" >> $INSTALL_LOG
|
echo "IPFS installed with ID ${IPFS_PEER_ID}" >> $INSTALL_LOG
|
||||||
|
|
|
@ -132,8 +132,10 @@ function ipfs_bootstrap {
|
||||||
ipfs_tox_id=$(echo "$ipfs_txt" | awk -F ':' '{print $2}')
|
ipfs_tox_id=$(echo "$ipfs_txt" | awk -F ':' '{print $2}')
|
||||||
$IPFS_COMMAND bootstrap add /ip4/${address}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id}
|
$IPFS_COMMAND bootstrap add /ip4/${address}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id}
|
||||||
if [ -d /home/$MY_USERNAME/Desktop ]; then
|
if [ -d /home/$MY_USERNAME/Desktop ]; then
|
||||||
|
if [[ $ipfs_tox_id != 'none' ]]; then
|
||||||
echo "$ipfs_tox_id:$ipfs_peer_id" >> ${IPFS_USERS_FILE}.new
|
echo "$ipfs_tox_id:$ipfs_peer_id" >> ${IPFS_USERS_FILE}.new
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
state=0
|
state=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue