#!/bin/bash set -e set -x # Shut down all services to ensure a quiescent state. supervisorctl stop all # Drop any open connections to any old database. Hackishly call using # source because postgres user can't read /root/zulip/scripts/setup. source "$(dirname "$0")/terminate-psql-sessions" postgres zulip zulip_base ( # Make sure the current working directory is readable by postgres cd / su postgres -c psql <