diff options
| author | Ben Busby <contact@benbusby.com> | 2022-08-04 13:16:58 -0600 |
|---|---|---|
| committer | Ben Busby <contact@benbusby.com> | 2022-08-04 13:16:58 -0600 |
| commit | e1e46dcd9271e68492db5fe259c1593f02e7ef84 (patch) | |
| tree | d65f727bfe0e3408805857551c47266da0d93589 /tools | |
| parent | e16d4bb3308922ceafaa5aed0b15182f940e4a3f (diff) | |
| download | farside-e1e46dcd9271e68492db5fe259c1593f02e7ef84.tar.gz | |
Remove cloudflare filter from update workflow
The cloudflare filter, when performed as part of the github action
workflow, doesn't seem to work nearly as reliably when run on an actual
machine.
The farside server will instead run the un-cloudflare script whenever it
pulls in new changes to services-full.json, which should be a much more
reliable approach to filtering out cloudflare instances.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/un-cloudflare.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/un-cloudflare.sh b/tools/un-cloudflare.sh index b10178b..dd5c716 100755 --- a/tools/un-cloudflare.sh +++ b/tools/un-cloudflare.sh @@ -10,7 +10,7 @@ while read -r line; do ns=$(dig ns "$domain" || true) if [[ "$ns" == *"cloudflare"* ]]; then echo "\"$domain\" using cloudflare, skipping..." - elif [ ${#ns} -eq 0 ]; then + elif [[ "$ns" != *"NOERROR"* ]]; then echo "Unable to verify records for \"$domain\", skipping..." else echo "$line" >> out.json @@ -21,7 +21,7 @@ while read -r line; do done <$file # Remove any trailing commas from new instance lists -sed -i '' -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json +sed -i -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json cat out.json | jq --indent 2 . > services.json rm -f out.json |
