Started working on start config magic

This commit is contained in:
Leopere 2018-11-11 20:51:41 -05:00 committed by Mark Beamer Jr
parent 933a61cc4c
commit 74d6cc34fe
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973

View file

@ -22,7 +22,7 @@ CONFIG_SETTINGS=(
APIMYSQLDSN APIMYSQLDSN
) )
function set_configs() { function set_configs(parameter) {
## Set configs on container start if not already set. ## Set configs on container start if not already set.
for i in "${!CONFIG_SETTINGS[@]}"; do for i in "${!CONFIG_SETTINGS[@]}"; do
echo ${CONFIG_SETTINGS[$i]}"_KEY" echo ${CONFIG_SETTINGS[$i]}"_KEY"
@ -37,8 +37,6 @@ function set_configs() {
if [[ ! -f /etc/chainquery/chainqueryconfig.toml ]]; then if [[ ! -f /etc/chainquery/chainqueryconfig.toml ]]; then
echo "[INFO]: Found no chainqueryconfig.toml" echo "[INFO]: Found no chainqueryconfig.toml"
echo " Installing default and configuring with provided environment variables if any." echo " Installing default and configuring with provided environment variables if any."
## Install fresh copy of config file.
cp /etc/chainquery/chainqueryconfig.toml.orig /etc/chainquery/chainqueryconfig.toml
set_configs set_configs
else else
echo "[INFO]: Found a copy of chainqueryconfig.toml in /etc/chainquery" echo "[INFO]: Found a copy of chainqueryconfig.toml in /etc/chainquery"