Skip to content
Snippets Groups Projects
Unverified Commit 5fc8bef8 authored by briancanini's avatar briancanini Committed by GitHub
Browse files

Merge pull request #115 from ASCWebServices/config_sync_folder

Config sync folder
parents e79f00f5 4e24f602
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,31 @@
/**
* Place the config directory outside of the Drupal root.
*/
if (is_dir($_ENV['HOME'] . '/files/private/config')) {
// error_log("Config sync dir: _ENV[HOME]/files/private/config exists, using this.");
$config_sync_dir = $_ENV['HOME'] . '/files/private/config';
}
else if(!empty($_ENV['FILEMOUNT'])) {
// error_log("Config sync dir: _ENV[FILEMOUNT] exists, using it.");
$config_sync_dir = DRUPAL_ROOT . '/' . $_ENV['FILEMOUNT'] . '/private/config';
}
else {
// error_log("Config sync dir: fell through to default.");
$config_sync_dir = DRUPAL_ROOT . '/sites/default/files/private/config';
}
// error_log("Config sync dir: $config_sync_dir");
if(!is_dir($config_sync_dir)) {
error_log("Config sync dir '$config_sync_dir' doesn't exist, attempting to create it.");
if(mkdir($config_sync_dir, 0700, true)) {
error_log("$config_sync_dir created");
}
else {
error_log("Failed to create $config_sync_dir");
}
}
$config_directories = array(
CONFIG_SYNC_DIRECTORY => $_ENV['HOME'] . '/files/private/config',
CONFIG_SYNC_DIRECTORY => $config_sync_dir,
);
/**
......
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