mirror of
https://github.com/raynormast/fake-firehose.git
synced 2024-12-22 07:43:10 +00:00
Merge pull request #5 from bolstad/deduplicte-endpoint-urls
Deduplicte endpoint urls
This commit is contained in:
commit
a4614e886b
1 changed files with 8 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
echo > /config/urls.txt
|
echo > /config/urls.txt
|
||||||
echo > /config/hosts
|
echo > /config/hosts
|
||||||
|
echo > /config/hashtag-urls.txt
|
||||||
|
|
||||||
# Get federated hosts and begin to stream them
|
# Get federated hosts and begin to stream them
|
||||||
cat /config/domains-federated | grep -v "##" | while read -r line
|
cat /config/domains-federated | grep -v "##" | while read -r line
|
||||||
|
@ -79,11 +80,14 @@ done
|
||||||
|
|
||||||
cat /config/hashtag-urls.txt >> /config/urls.txt
|
cat /config/hashtag-urls.txt >> /config/urls.txt
|
||||||
|
|
||||||
cat /config/urls.txt | while read -r url
|
sort -u /config/urls.txt | while read -r url
|
||||||
do
|
do
|
||||||
|
if [[ ! $url == "#"* ]]
|
||||||
|
then
|
||||||
echo "[INFO] Opening $url to stream"
|
echo "[INFO] Opening $url to stream"
|
||||||
sleep $streamDelay
|
sleep $streamDelay
|
||||||
./stream-url.sh $url &
|
./stream-url.sh $url &
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $runFirehose == true ]]
|
if [[ $runFirehose == true ]]
|
||||||
|
|
Loading…
Reference in a new issue