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 @ 1597:eeacb8332051

History | View | Annotate | Download (494 Bytes)

1
#!/bin/bash
2

    
3
set -e
4

    
5
# Copy across the database config file (the source file has presumably
6
# been generated from a skeleton, earlier in provisioning)
7

    
8
infile=/var/www/code/deploy/config/database.yml.gen
9
outfile=/var/www/code/config/database.yml
10

    
11
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
fi
18