Commit c2ffbb5e authored by Adrian Rossouw's avatar Adrian Rossouw

Includes is a single file that gets synched to many locations.

parent d666459c
......@@ -83,6 +83,6 @@
}
# Additional host wide configuration settings. Useful for safely specifying configuration settings.
if (file_exists('<?php print $this->platform->server->config_path ?>/includes/global.inc')) {
include_once('<?php print $this->platform->server->config_path ?>/includes/global.inc');
if (file_exists('<?php print $this->platform->server->include_path ?>/global.inc')) {
include_once('<?php print $this->platform->server->include_path ?>/global.inc');
}
......@@ -24,14 +24,14 @@ function drush_provision_drupal_provision_verify_validate() {
function drush_provision_drupal_provision_verify() {
if (d()->type === 'server') {
provision_file()->create_dir(d()->config_path, dt('Provision configuration'), 0711);
provision_file()->create_dir(d()->config_path . '/includes', dt('Provision PHP configuration'), 0711);
if (!provision_file()->exists(d()->config_path . '/includes/global.inc')->succeed('Global configuration file exists')->status()) {
provision_file()->create_dir(d()->include_path, dt('Provision PHP configuration'), 0711);
if (!provision_file()->exists(d()->include_path . '/global.inc')->succeed('Global configuration file exists')->status()) {
// Create an empty global.inc so the include doesn't fail with
// open_basedir restrictions
$config = new provisionConfig_global_settings(d()->name);
$config->write();
}
d()->service('http')->sync(d()->config_path . '/includes');
d()->service('http')->sync(d()->include_path);
if (d()->name == '@server_localhost') {
provision_file()->create_dir(d()->backup_path, dt('Backup'), 0700);
......@@ -61,7 +61,7 @@ class provisionConfig_global_settings extends provisionConfig {
public $description = 'Global settings.php file';
function filename() {
return $this->config_path . '/includes/global.inc';
return $this->include_path . '/global.inc';
}
function process() {
......
......@@ -277,6 +277,8 @@ class provisionServer extends provisionEnvironment {
$this->setProperty('aegir_root', '/var/aegir');
$this->backup_path = $this->aegir_root . '/backups';
$this->config_path = $this->aegir_root . '/config/' . ltrim($this->name, '@');
$this->include_path = $this->aegir_root . '/config/includes';
$this->setProperty('master_url');
$this->load_services();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment