]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/planet/files/default/replication-bin/users-agreed
Make users-agreed a template
[chef.git] / cookbooks / planet / files / default / replication-bin / users-agreed
diff --git a/cookbooks/planet/files/default/replication-bin/users-agreed b/cookbooks/planet/files/default/replication-bin/users-agreed
deleted file mode 100644 (file)
index 707a65b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# DO NOT EDIT - This file is being maintained by Chef
-
-T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX)
-
-export PGPASSFILE=/etc/replication/users-agreed.conf
-
-echo "# user IDs < 286582 who have agreed to the contributor terms. " > $T/users_agreed
-echo "# any active user IDs >= 286582 would have agreed as part of the sign-up process." >> $T/users_agreed
-psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where id < 286582 and terms_agreed is not null order by id asc" openstreetmap >> $T/users_agreed
-
-psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where terms_seen and terms_agreed is null order by id asc" openstreetmap > $T/users_disagreed
-
-if cmp -s "${T}/users_agreed" "/store/planet/users_agreed/users_agreed.txt"; then
-  : # do nothing
-else
-  cp $T/users_agreed /store/planet/users_agreed/users_agreed.txt
-fi
-
-if cmp -s "${T}/users_disagreed" "/store/planet/users_agreed/users_disagreed.txt"; then
-  : #  do nothing
-else
-  cp $T/users_disagreed /store/planet/users_agreed/users_disagreed.txt
-fi
-
-rm -rf $T