[bitnami/drupal] Fix problem in getting database port on second run in libdrupal.sh (#73235)

* Fix problem in getting port in libdrupal.sh

Signed-off-by: Ricardo Amaro <ricardoamaro@users.noreply.github.com>

* Fix also in Drupal 11

Signed-off-by: Ricardo Amaro <ricardoamaro@users.noreply.github.com>

---------

Signed-off-by: Ricardo Amaro <ricardoamaro@users.noreply.github.com>
This commit is contained in:
Ricardo Amaro 2024-11-05 08:45:18 +00:00 committed by GitHub
parent b321f70628
commit df18860bfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ drupal_initialize() {
drupal_database_conf_get() {
local -r key="${1:?key missing}"
debug "Getting ${key} from Drupal database configuration"
grep -E "^\s*'${key}' =>" "$DRUPAL_CONF_FILE" | grep -E -o "=> '.*'" | cut -f2 -d\'
grep -E "^\s*'${key}' =>" "$DRUPAL_CONF_FILE" | awk -F'=>' '{gsub(/[ ,'\''"]/, "", $2); print $2}'
}
########################

View File

@ -203,7 +203,7 @@ drupal_initialize() {
drupal_database_conf_get() {
local -r key="${1:?key missing}"
debug "Getting ${key} from Drupal database configuration"
grep -E "^\s*'${key}' =>" "$DRUPAL_CONF_FILE" | grep -E -o "=> '.*'" | cut -f2 -d\'
grep -E "^\s*'${key}' =>" "$DRUPAL_CONF_FILE" | awk -F'=>' '{gsub(/[ ,'\''"]/, "", $2); print $2}'
}
########################