To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / deploy / provision.d / 050-webapp-db.sh @ 1605:18643ab36008

History | View | Annotate | Download (494 Bytes)

1 1577:e38eee2e1d47 Chris
#!/bin/bash
2
3
set -e
4
5 1589:94669513c53c Chris
# Copy across the database config file (the source file has presumably
6
# been generated from a skeleton, earlier in provisioning)
7
8 1593:83412a0a2389 Chris
infile=/var/www/code/deploy/config/database.yml.gen
9 1589:94669513c53c Chris
outfile=/var/www/code/config/database.yml
10 1587:d8949733849d Chris
11 1589:94669513c53c Chris
if [ ! -f "$outfile" ]; then
12
    if [ ! -f "$infile" ]; then
13
        echo "ERROR: Database config file $infile not found - has the database secret been interpolated from $infile.in correctly?"
14
        exit 2
15
    fi
16
    cp "$infile" "$outfile"
17 1577:e38eee2e1d47 Chris
fi