#!/bin/bash

# This script handles half of the rotation of the development
# databases from the lastest backup of sitedb. The point of this
# script is to restore service of postgresql on this host.

source /var/lib/postgresql/bin/devdb-lib.sh
devdb-lock /var/tmp/devdb-rotate

echo "Setting up pgbouncer to route queries locally."
bounce_pgbouncer proxy1 local remote
bounce_pgbouncer proxy2 local remote
