Skip to content

Commit

Permalink
Fixed broken searchall shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
luccioman committed Dec 10, 2018
1 parent 8be829c commit 1b3cb38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion bin/searchall.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env sh
# Perform a search on the Solr index of each active principal and senior peers known by the local peer
# $1 search term

cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh

port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
./searchall1.sh -s localhost:$port $1
./searchall1.sh "localhost:$port" "$1"
13 changes: 11 additions & 2 deletions bin/searchall1.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
TMPFILE=`mktemp -t search` || exit 1
for address in `./up.sh $1`; do sleep 0.01; ./search1.sh -s $address $2 >> $TMPFILE & done
#!/usr/bin/env sh
# Perform a search on the Solr index of each active principal and senior peers known by the given peer
# $1 a peer address as host:port
# $2 search term

TMPFILE=`mktemp -t searchXXX` || exit 1
for address in `./up.sh $1`;
do
sleep 0.01
./search1.sh -s `printf "$address" | tr -d '\r\n'` "$2" >> "$TMPFILE" &
done
sleep 2
cat $TMPFILE

0 comments on commit 1b3cb38

Please sign in to comment.