Mercurial > hg > soundsoftware-site
view deploy/provision.d/080-database-load.sh @ 1603:455ca6e45c49 deploy
Directory fix
author | Chris Cannam |
---|---|
date | Thu, 24 Aug 2017 14:46:03 +0100 |
parents | 94669513c53c |
children | 5486a5848ad8 |
line wrap: on
line source
#!/bin/bash set -e # Start the database and if a dump file is found, load it. The dump # file is then deleted so that the db won't be overwritten on # subsequent runs. (The original repo contains no dump file, so it # should exist only if you have provided some data to load.) /etc/init.d/postgresql start cd /var/www/code if [ -f postgres-dumpall ]; then chmod ugo+r postgres-dumpall sudo -u postgres psql -f postgres-dumpall postgres rm postgres-dumpall fi