comparison deploy/provision.d/080-database-load.sh @ 1589:94669513c53c dockerise

Docs etc
author Chris Cannam
date Thu, 17 Aug 2017 13:56:15 +0100
parents d8949733849d
children 5486a5848ad8
comparison
equal deleted inserted replaced
1588:9149f2098413 1589:94669513c53c
1 #!/bin/bash 1 #!/bin/bash
2 2
3 set -e 3 set -e
4
5 # Start the database and if a dump file is found, load it. The dump
6 # file is then deleted so that the db won't be overwritten on
7 # subsequent runs. (The original repo contains no dump file, so it
8 # should exist only if you have provided some data to load.)
4 9
5 /etc/init.d/postgresql start 10 /etc/init.d/postgresql start
6 11
7 cd /var/www/code 12 cd /var/www/code
8 13
9 if [ -f postgres-dumpall ]; then 14 if [ -f postgres-dumpall ]; then
10 chmod ugo+r postgres-dumpall 15 chmod ugo+r postgres-dumpall
11 sudo -u postgres psql -f postgres-dumpall postgres 16 sudo -u postgres psql -f postgres-dumpall postgres
12 rm postgres-dumpall # This was just a copy of the shared folder file anyway 17 rm postgres-dumpall
13 fi 18 fi
14 19
15
16