浏览代码

Use address rather than hostname

Bob Mottram 9 年前
父节点
当前提交
0ab2d31fe1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/zeronetavahi

+ 2
- 2
src/zeronetavahi 查看文件

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