Skip to content
Snippets Groups Projects
Commit 8030161a authored by bcweaver's avatar bcweaver
Browse files

Enhance conditional config sync directory logic

parent e79f00f5
No related branches found
No related tags found
No related merge requests found
......@@ -19,10 +19,25 @@
/**
* Place the config directory outside of the Drupal root.
*/
$config_directories = array(
CONFIG_SYNC_DIRECTORY => $_ENV['HOME'] . '/files/private/config',
);
if(!empty($_ENV['FILEMOUNT'])) {
error_log("Config sync dir: _ENV[FILEMOUNT] exists, using it.");
$config_directories = array(
CONFIG_SYNC_DIRECTORY => DRUPAL_ROOT . '/' . $_ENV['FILEMOUNT'] . '/private/config',
);
}
else if (is_dir($_ENV['HOME'] . '/files/private/config')) {
error_log("Config sync dir: _ENV[HOME]/files/private/config exists, using this.");
$config_directories = array(
CONFIG_SYNC_DIRECTORY => $_ENV['HOME'] . '/files/private/config',
);
}
else {
error_log("Config sync dir: fell through to default.");
$config_directories = array(
CONFIG_SYNC_DIRECTORY => DRUPAL_ROOT . '/sites/default/files/private/config',
);
}
error_log("Config sync dir: " . $config_directories[CONFIG_SYNC_DIRECTORY]);
/**
* If there is a local settings file, then include it
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment