view deploy/provision.d/050-webapp-db.sh @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents 83412a0a2389
children
line wrap: on
line source
#!/bin/bash

set -e

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

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

if [ ! -f "$outfile" ]; then
    if [ ! -f "$infile" ]; then
        echo "ERROR: Database config file $infile not found - has the database secret been interpolated from $infile.in correctly?"
        exit 2
    fi
    cp "$infile" "$outfile"
fi