Skip to content

Commit f451411

Browse files
committed
pocs/tlauncher_server_check
Signed-off-by: lucasew <[email protected]>
1 parent b5498c1 commit f451411

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

poc/tlauncher_server_check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env nix-shell
2+
#! nix-shell -i bash -p curl jq
3+
4+
curl "https://repo.tlauncher.org/update/downloads/configs/servers.json" 2> /dev/null | grep 'address' | sed 's/^[^:]*: "\([^":]*\)[^$]*$/\1/g' | tr '[:upper:]' '[:lower:]' | sort | uniq | while read -r line; do
5+
ping "$line" -c 1 > /dev/null 2> /dev/null && printf "OK" || printf "FAIL"
6+
printf " $line"
7+
printf "\n"
8+
done

0 commit comments

Comments
 (0)