From 276e463e3097fbe68173aa0e7383b74ee8ed97ce Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 3 Sep 2015 15:36:48 +0100 Subject: [PATCH] Fixing content discovery --- src/zeronetavahi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/zeronetavahi b/src/zeronetavahi index f89efd82..38934c22 100755 --- a/src/zeronetavahi +++ b/src/zeronetavahi @@ -147,7 +147,7 @@ if [ -f $BLOGS_FILE.new ]; then rm -f $BLOGS_FILE.new fi -cat $TEMPFILE_BASE | grep "ZeroNet Blog\|hostname =\|address =\|port =\|txt-record =" > $TEMPFILE +cat $TEMPFILE_BASE | grep "ZeroNet Blog\|hostname =\|address =\|port =\|txt =" > $TEMPFILE state=0 address="" @@ -155,9 +155,10 @@ peer="" echo '
    ' >> $BLOGS_FILE.new while IFS='' read -r line || [[ -n "$line" ]]; do if [ ${state} -eq "3" ]; then - if [[ $line == *"txt-record ="* ]]; then + if [[ $line == *"txt ="* ]]; then blog_url=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}') - echo "
  1. ${peer}
  2. " >> $BLOGS_FILE.new + echo $blog_url + echo "
  3. ${peer}
  4. " >> $BLOGS_FILE.new state=0 fi fi @@ -184,7 +185,7 @@ if [ -f $FORUM_FILE.new ]; then rm -f $FORUM_FILE.new fi -cat $TEMPFILE_BASE | grep "ZeroNet Forum\|hostname =\|address =\|port =\|txt-record =" > $TEMPFILE +cat $TEMPFILE_BASE | grep "ZeroNet Forum\|hostname =\|address =\|port =\|txt =" > $TEMPFILE state=0 address="" @@ -192,9 +193,9 @@ peer="" echo '
      ' >> $FORUM_FILE.new while IFS='' read -r line || [[ -n "$line" ]]; do if [ ${state} -eq "3" ]; then - if [[ $line == *"txt-record ="* ]]; then + if [[ $line == *"txt ="* ]]; then forum_url=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}') - echo "
    1. ${peer}
    2. " >> $FORUM_FILE.new + echo "
    3. ${peer}
    4. " >> $FORUM_FILE.new state=0 fi fi