From e66b06503dc95d5170bedcefe8a9d398c526ddfd Mon Sep 17 00:00:00 2001 From: Christian Bolstad Date: Sat, 14 Jan 2023 13:50:32 +0100 Subject: [PATCH 1/3] always reset hashtag-urls.txt --- scripts/start-firehose.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/start-firehose.sh b/scripts/start-firehose.sh index dd46934..01c9938 100644 --- a/scripts/start-firehose.sh +++ b/scripts/start-firehose.sh @@ -2,6 +2,7 @@ echo > /config/urls.txt echo > /config/hosts +echo > /config/hashtag-urls.txt # Get federated hosts and begin to stream them cat /config/domains-federated | grep -v "##" | while read -r line From 237ed1303d2abcc6257767de4271bc6c733fcc0b Mon Sep 17 00:00:00 2001 From: Christian Bolstad Date: Sat, 14 Jan 2023 13:51:31 +0100 Subject: [PATCH 2/3] Make sure that we only process the same url once --- scripts/start-firehose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start-firehose.sh b/scripts/start-firehose.sh index 01c9938..7d615c1 100644 --- a/scripts/start-firehose.sh +++ b/scripts/start-firehose.sh @@ -80,7 +80,7 @@ done 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 echo "[INFO] Opening $url to stream" sleep $streamDelay From 237840aa334a2e9f060af6be7b4fb9e5bee0dc9d Mon Sep 17 00:00:00 2001 From: Christian Bolstad Date: Sat, 14 Jan 2023 13:52:53 +0100 Subject: [PATCH 3/3] Do not process hostnames that starts with a single # (in case someone accidently used the incorrect format to comment out lines --- scripts/start-firehose.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/start-firehose.sh b/scripts/start-firehose.sh index 7d615c1..910b314 100644 --- a/scripts/start-firehose.sh +++ b/scripts/start-firehose.sh @@ -82,9 +82,12 @@ cat /config/hashtag-urls.txt >> /config/urls.txt sort -u /config/urls.txt | while read -r url do - echo "[INFO] Opening $url to stream" - sleep $streamDelay - ./stream-url.sh $url & + if [[ ! $url == "#"* ]] + then + echo "[INFO] Opening $url to stream" + sleep $streamDelay + ./stream-url.sh $url & + fi done if [[ $runFirehose == true ]]