Browse Source

Fixing content discovery

Bob Mottram 9 years ago
parent
commit
276e463e30
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      src/zeronetavahi

+ 7
- 6
src/zeronetavahi View File

@@ -147,7 +147,7 @@ if [ -f $BLOGS_FILE.new ]; then
147 147
     rm -f $BLOGS_FILE.new
148 148
 fi
149 149
 
150
-cat $TEMPFILE_BASE | grep "ZeroNet Blog\|hostname =\|address =\|port =\|txt-record =" > $TEMPFILE
150
+cat $TEMPFILE_BASE | grep "ZeroNet Blog\|hostname =\|address =\|port =\|txt =" > $TEMPFILE
151 151
 
152 152
 state=0
153 153
 address=""
@@ -155,9 +155,10 @@ peer=""
155 155
 echo '<ol type="square">' >> $BLOGS_FILE.new
156 156
 while IFS='' read -r line || [[ -n "$line" ]]; do
157 157
     if [ ${state} -eq "3" ]; then
158
-        if [[ $line == *"txt-record ="* ]]; then
158
+        if [[ $line == *"txt ="* ]]; then
159 159
             blog_url=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
160
-            echo "  <li><a href=\"${blog_url}\">${peer}</a></li>" >> $BLOGS_FILE.new
160
+            echo $blog_url
161
+            echo "  <li><a href=${blog_url}>${peer}</a></li>" >> $BLOGS_FILE.new
161 162
             state=0
162 163
         fi
163 164
     fi
@@ -184,7 +185,7 @@ if [ -f $FORUM_FILE.new ]; then
184 185
     rm -f $FORUM_FILE.new
185 186
 fi
186 187
 
187
-cat $TEMPFILE_BASE | grep "ZeroNet Forum\|hostname =\|address =\|port =\|txt-record =" > $TEMPFILE
188
+cat $TEMPFILE_BASE | grep "ZeroNet Forum\|hostname =\|address =\|port =\|txt =" > $TEMPFILE
188 189
 
189 190
 state=0
190 191
 address=""
@@ -192,9 +193,9 @@ peer=""
192 193
 echo '<ol type="square">' >> $FORUM_FILE.new
193 194
 while IFS='' read -r line || [[ -n "$line" ]]; do
194 195
     if [ ${state} -eq "3" ]; then
195
-        if [[ $line == *"txt-record ="* ]]; then
196
+        if [[ $line == *"txt ="* ]]; then
196 197
             forum_url=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
197
-            echo "  <li><a href=\"${forum_url}\">${peer}</a></li>" >> $FORUM_FILE.new
198
+            echo "  <li><a href=${forum_url}>${peer}</a></li>" >> $FORUM_FILE.new
198 199
             state=0
199 200
         fi
200 201
     fi