Chris@1577: #!/bin/bash Chris@1577: Chris@1577: set -e Chris@1577: Chris@1589: # Copy across the database config file (the source file has presumably Chris@1589: # been generated from a skeleton, earlier in provisioning) Chris@1589: Chris@1593: infile=/var/www/code/deploy/config/database.yml.gen Chris@1589: outfile=/var/www/code/config/database.yml Chris@1587: Chris@1589: if [ ! -f "$outfile" ]; then Chris@1589: if [ ! -f "$infile" ]; then Chris@1589: echo "ERROR: Database config file $infile not found - has the database secret been interpolated from $infile.in correctly?" Chris@1589: exit 2 Chris@1589: fi Chris@1589: cp "$infile" "$outfile" Chris@1577: fi Chris@1577: