summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-15 08:55:01 +0200
committerErich Eckner <git@eckner.net>2018-05-15 08:55:01 +0200
commitf080dc0522db5f5a6f19c92ad54b3a9aabbe2e83 (patch)
tree5a36fb22835d89af0d3449ecd11d700d740cbca6
parent8b9462c25d6e9013dbfcaa03ebd9126d0495dcbe (diff)
downloadreleng-f080dc0522db5f5a6f19c92ad54b3a9aabbe2e83.tar.xz
find-inofficial-mirrors new to detect people rsyncing from the master mirror but not being official mirror
-rwxr-xr-xfind-inofficial-mirrors19
1 files changed, 19 insertions, 0 deletions
diff --git a/find-inofficial-mirrors b/find-inofficial-mirrors
new file mode 100755
index 0000000..5f6a300
--- /dev/null
+++ b/find-inofficial-mirrors
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+sudo journalctl -b "-${1:-0}" -u rsyncd | \
+ grep ' rsync on archlinux32/' | \
+ grep -ivwF "$(
+ dig pool.mirror.archlinux32.org | \
+ sed -n '
+ s/^pool32\.ddns\.eckner\.net\.\s.*\s/(/
+ T
+ s/$/)/
+ p
+ '
+ )" | \
+ sed '
+ s/.* \(\S\+\) (\S\+)$/\1/
+ ' | \
+ sort | \
+ uniq -c | \
+ sort -k1n,1