allow DB_BACKEND to be expanded (#1400)

* allow DB_BACKEND to be expanded

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
This commit is contained in:
Manuel Sabban 2022-03-30 11:33:26 +02:00 committed by GitHub
parent 16b9fd82f0
commit b076f1d582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -87,7 +87,7 @@ restore() {
config_yaml() {
MYSQL_PORT=${MYSQL_PORT} MYSQL_HOST=${MYSQL_HOST} yq '
.db_config.type="$DB_BACKEND"|
.db_config.type=strenv(DB_BACKEND)|
.db_config.user="crowdsec_test" |
.db_config.password="crowdsec_test" |
.db_config.db_name="crowdsec_test" |

View file

@ -61,7 +61,7 @@ restore() {
config_yaml() {
yq '
.db_config.type="$DB_BACKEND"|
.db_config.type=strenv(DB_BACKEND)|
.db_config.user="crowdsec_test" |
.db_config.password="crowdsec_test" |
.db_config.db_name="crowdsec_test" |

View file

@ -31,7 +31,7 @@ DB_FILE="${DATA_DIR}/crowdsec.db"
config_yaml() {
yq '
.db_config.type="$DB_BACKEND" |
.db_config.type=strenv(DB_BACKEND) |
.db_config.db_path="${DB_FILE}"
' -i "${CONFIG_YAML}"
}