[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [chutney/master] Handle hidden services on old tor versions in hsaddress.sh



commit 85ed9bc07d90cd053905f5545a0967368ea3eb59
Author: teor <teor2345@xxxxxxxxx>
Date:   Thu Feb 23 17:23:29 2017 +1100

    Handle hidden services on old tor versions in hsaddress.sh
    
    Closes #21533.
---
 tools/hsaddress.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/hsaddress.sh b/tools/hsaddress.sh
index 8dedc2e..b880164 100755
--- a/tools/hsaddress.sh
+++ b/tools/hsaddress.sh
@@ -27,7 +27,8 @@ function show_address() {
 [ -d $DEST ] || { echo "$NAME: no nodes available"; exit 1; }
 if [ $# -eq 0 ];
 then
-    for dir in $DEST/*h;
+    # support hOLD
+    for dir in "$DEST"/*h*;
     do
         FILE=${dir}/$TARGET
         [ -e $FILE ] || continue
@@ -37,7 +38,8 @@ then
 elif [ $# -eq 1 ];
 then
     [ -d $DEST/$1 ] || { echo "$NAME: $1 not found"; exit 1; }
-    [[ $1 =~ .*h$ ]] || { echo "$NAME: $1 is not a HS"; exit 1; }
+    # support hOLD
+    [[ "$1" =~ .*h.* ]] || { echo "$NAME: $1 is not a HS"; exit 1; }
     FILE=$DEST/$1/$TARGET
     [ -e $FILE ] || { echo "$NAME: $FILE not found"; exit 1; }
     show_address $FILE



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits