Use address rather than hostname

This commit is contained in:
Bob Mottram 2015-09-30 20:11:20 +01:00
parent d0bd8807b8
commit 0ab2d31fe1
1 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@ done < "$TEMPFILE"
echo '<ol>' >> $FORUM_FILE.new echo '<ol>' >> $FORUM_FILE.new
# detect fora in the mesh # detect IPFS file shares in the mesh
if [ -f $IPFS_FILE.new ]; then if [ -f $IPFS_FILE.new ]; then
rm -f $IPFS_FILE.new rm -f $IPFS_FILE.new
fi fi
@ -241,7 +241,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
if [ ${state} -eq "3" ]; then if [ ${state} -eq "3" ]; then
if [[ $line == *"txt ="* ]]; then if [[ $line == *"txt ="* ]]; then
ipfs_peer_id=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}') ipfs_peer_id=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
ipfs add /ip4/${peer}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id} ipfs add /ip4/${address}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id}
echo " <li><a href=http://localhost:5001/ipfs/${ipfs_peer_id}>${peer}</a></li>" >> $IPFS_FILE.new echo " <li><a href=http://localhost:5001/ipfs/${ipfs_peer_id}>${peer}</a></li>" >> $IPFS_FILE.new
state=0 state=0
fi fi