[Bps-public-commit] cpan2rt branch, master, updated. 96bbcb71cd8c1d3cb8b5ecb47f6949142e43b9f9
Dianne Skoll
dianne at bestpractical.com
Fri Mar 12 15:34:15 EST 2021
The branch, master has been updated
via 96bbcb71cd8c1d3cb8b5ecb47f6949142e43b9f9 (commit)
from de93cd13eed5866e6e5d6efdb7352c47ac616582 (commit)
Summary of changes:
bin/sync-queues-to-pobox | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100755 bin/sync-queues-to-pobox
- Log -----------------------------------------------------------------
commit 96bbcb71cd8c1d3cb8b5ecb47f6949142e43b9f9
Author: Dianne Skoll <dianne at bestpractical.com>
Date: Fri Mar 12 20:33:51 2021 +0000
Add shell script to push mail routes to pobox.com for all of our queues
diff --git a/bin/sync-queues-to-pobox b/bin/sync-queues-to-pobox
new file mode 100755
index 0000000..8e0872e
--- /dev/null
+++ b/bin/sync-queues-to-pobox
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Sync queues over to pobox.com
+#
+# Strategy:
+#
+# Pull out all queue names
+# But not those containing spaces or colons or a plus sign,
+# or the queue named '___Approvals', or any queues whose names end
+# in a period (our data is pretty messy)
+#
+# Convert QNAME to a CSV entry of the form:
+# QNAME,QNAME at rt-cpan-org.hostedrt.com
+#
+# Feed to /home/admin/git-repos-from-github/pobox-bulk-go/cmd/sync/sync.go
+# which must be invoked FROM THE DIRECTORY
+# /home/admin/git-repos-from-github/pobox-bulk-go
+# for some strange go-ish reason
+
+DIR=/home/admin/git-repos-from-github/pobox-bulk-go
+cd $DIR
+if test "$?" != 0 ; then
+ echo "*** Cannot cd $DIR; bailing out"
+ exit 1
+fi
+
+psql -U admin -h 127.0.0.1 -c "SELECT Name FROM Queues" --tuples-only --no-align rt5 | \
+ egrep -v '[ :+]' | grep -v '^___Approvals$' | grep -v '\.$' | \
+ sed -e 's/\(.*\)/\1,\1 at rt-cpan-org.hostedrt.com/' | \
+ /usr/local/go/bin/go run cmd/sync/sync.go --domain rt.cpan.org --timeout 60m0s --delay 0
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list