3 # DO NOT EDIT - This file is being maintained by Chef
5 T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX)
7 export PGPASSFILE=/etc/replication/users-agreed.conf
9 echo "# user IDs < 286582 who have agreed to the contributor terms. " > "$T/users_agreed"
10 echo "# any active user IDs >= 286582 would have agreed as part of the sign-up process." >> "$T/users_agreed"
11 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"
13 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"
15 if cmp -s "${T}/users_agreed" "/store/planet/users_agreed/users_agreed.txt"; then
18 cp "$T/users_agreed" /store/planet/users_agreed/users_agreed.txt
21 if cmp -s "${T}/users_disagreed" "/store/planet/users_agreed/users_disagreed.txt"; then
24 cp "$T/users_disagreed" /store/planet/users_agreed/users_disagreed.txt