fix: use random temporary file names in dburl dotenv
This commit is contained in:
@@ -21,9 +21,12 @@ DB_URL="$1";
|
|||||||
# - $DB_PORT
|
# - $DB_PORT
|
||||||
# - $DB_NAME
|
# - $DB_NAME
|
||||||
# - any query var as a prefixed variable $db_arg_${name}=${value}
|
# - any query var as a prefixed variable $db_arg_${name}=${value}
|
||||||
dburl-parser.sh ${DB_URL} > /tmp/ofelia.dotenv;
|
dotenv_path="/tmp/ofelia-$(
|
||||||
source /tmp/ofelia.dotenv;
|
tr -dc A-Za-z0-9 </dev/urandom | head -c 16; echo
|
||||||
rm /tmp/ofelia.dotenv;
|
).dotenv"
|
||||||
|
dburl-parser.sh ${DB_URL} > ${dotenv_path};
|
||||||
|
source ${dotenv_path};
|
||||||
|
rm ${dotenv_path};
|
||||||
|
|
||||||
# set backup destination
|
# set backup destination
|
||||||
if test -z "${BACKUP_DATABASES_PATH}"; then
|
if test -z "${BACKUP_DATABASES_PATH}"; then
|
||||||
|
|||||||
@@ -21,9 +21,12 @@ DB_URL="$1";
|
|||||||
# - $DB_PORT
|
# - $DB_PORT
|
||||||
# - $DB_NAME
|
# - $DB_NAME
|
||||||
# - any query var as a prefixed variable $db_arg_${name}=${value}
|
# - any query var as a prefixed variable $db_arg_${name}=${value}
|
||||||
dburl-parser.sh ${DB_URL} > /tmp/ofelia.dotenv;
|
dotenv_path="/tmp/ofelia-$(
|
||||||
source /tmp/ofelia.dotenv;
|
tr -dc A-Za-z0-9 </dev/urandom | head -c 16; echo
|
||||||
rm /tmp/ofelia.dotenv;
|
).dotenv"
|
||||||
|
dburl-parser.sh ${DB_URL} > ${dotenv_path};
|
||||||
|
source ${dotenv_path};
|
||||||
|
rm ${dotenv_path};
|
||||||
|
|
||||||
# set backup destination
|
# set backup destination
|
||||||
if test -z "${BACKUP_DATABASES_PATH}"; then
|
if test -z "${BACKUP_DATABASES_PATH}"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user