From b97c8f527530ec546a3cd597ecf7feffe3fd2f1a Mon Sep 17 00:00:00 2001 From: Steve Worley Date: Wed, 31 Jul 2019 11:14:06 +1000 Subject: [PATCH] Update settings.php to accept env var for shield configuration. --- .docker/images/govcms7/settings/settings.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.docker/images/govcms7/settings/settings.php b/.docker/images/govcms7/settings/settings.php index f13d3c13..455888fe 100644 --- a/.docker/images/govcms7/settings/settings.php +++ b/.docker/images/govcms7/settings/settings.php @@ -169,6 +169,13 @@ public function __toString() { $conf['clamav_mode'] = 1; $conf['clamav_executable_path'] = '/usr/bin/clamscan'; +// Ensure that shield is configured correctly. +if (getenv('LAGOON') && (getenv('DRUPAL_SHIELD_USER') && getenv('DRUPAL_SHIELD_PASS'))) { + $conf['shield_enabled'] = 1; + $conf['shield_user'] = getenv('DRUPAL_SHIELD_USER'); + $conf['shield_pass'] = getenv('DRUPAL_SHIELD_PASS'); +} + // Loading settings for all environment types. if (file_exists(__DIR__ . '/all.settings.php')) { include __DIR__ . '/all.settings.php';