build: imported latest changes from grafana-docker.

This commit is contained in:
Leonard Gram
2018-08-02 19:24:05 +02:00
parent e848930476
commit 580e2c36d1
6 changed files with 62 additions and 31 deletions
+4 -4
View File
@@ -46,11 +46,11 @@ if [ ! -z ${GF_AWS_PROFILES+x} ]; then
chmod 600 "$GF_PATHS_HOME/.aws/credentials"
fi
# Convert all environment variables with names ending in _FILE into the content of
# the file that they point at and use the name without the trailing _FILE.
# Convert all environment variables with names ending in __FILE into the content of
# the file that they point at and use the name without the trailing __FILE.
# This can be used to carry in Docker secrets.
for VAR_NAME in $(env | grep '^GF_[^=]\+_FILE=.\+' | sed -r "s/([^=]*)_FILE=.*/\1/g"); do
VAR_NAME_FILE="$VAR_NAME"_FILE
for VAR_NAME in $(env | grep '^GF_[^=]\+__FILE=.\+' | sed -r "s/([^=]*)__FILE=.*/\1/g"); do
VAR_NAME_FILE="$VAR_NAME"__FILE
if [ "${!VAR_NAME}" ]; then
echo >&2 "ERROR: Both $VAR_NAME and $VAR_NAME_FILE are set (but are exclusive)"
exit 1