feat: support restore data to postgresql database

This commit is contained in:
ttionya committed 2022-12-11 23:02:10 +08:00
1 parent 3740262e8c
commit d5613d5cfe
3 files changed
+32 -10

No files matched your search

+12
View File
@@ -142,6 +142,18 @@ function send_ping() {
fi
}
########################################
# Configure PostgreSQL password file.
# Arguments:
# None
########################################
function configure_postgresql() {
if [[ "${DB_TYPE}" == "POSTGRESQL" ]]; then
echo "${PG_HOST}:${PG_PORT}:${PG_DBNAME}:${PG_USERNAME}:${PG_PASSWORD}" > ~/.pgpass
chmod 0600 ~/.pgpass
fi
}
########################################
# Export variables from .env file.
# Arguments: