Commit 5f17cea1 authored by Adrian Rossouw's avatar Adrian Rossouw

remove non configurable fields and default them against the backend server object during init.

parent 12fc22dd
......@@ -19,7 +19,12 @@ class provisionService_http extends provisionService {
function init() {
parent::init();
// System account
$this->server->setProperty('web_group', _provision_default_web_group());
if ($this->server->name == '@server_localhost') {
$this->server->setProperty('web_group', _provision_default_web_group());
}
else {
$this->server->web_group = d('@server_localhost')->web_group;
}
// Redirection urls
$this->server->setProperty('web_disable_url', $this->server->master_url .'/hosting/disabled');
......
......@@ -41,10 +41,7 @@ function drush_provision_hostmaster_install($site = NULL) {
drush_backend_invoke_args("provision-save", array($server), array(
'context_type' => 'server',
// files
'file_service_type' => 'local',
'aegir_root' => $aegir_root,
'config_path' => $aegir_root . '/config',
'backup_path' => $aegir_root . '/backups',
'script_user' => drush_get_option('script_user', 'aegir'),
// apache
'http_service_type' => 'apache',
......@@ -52,7 +49,6 @@ function drush_provision_hostmaster_install($site = NULL) {
// mysql
'db_service_type' => 'mysql',
'master_db' => $data['master_db'],
));
provision_backend_invoke($server, 'provision-verify');
......
......@@ -20,11 +20,7 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
$server = '@server_localhost';
drush_backend_invoke_args("provision-save", array($server), array(
'context_type' => 'server',
// files
'file_service_type' => 'local',
'aegir_root' => dirname(rtrim($data['config_path'], '/')),
'config_path' => $data['config_path'],
'backup_path' => $data['backup_path'],
'script_user' => $data['script_user'],
// apache
'http_service_type' => 'apache',
......
......@@ -74,6 +74,7 @@ function drush_provision_drupal_provision_migrate($platform) {
function drush_provision_drupal_provision_migrate_rollback($platform) {
drush_backend_invoke_args('provision-save', array(d()->name), array('platform' => drush_get_option('old_platform'), 'root' => null, 'uri' => null));
}
/**
* Delete the old site directory and recreate the settings file
*/
......
......@@ -247,8 +247,6 @@ class provisionServer extends provisionEnvironment {
'--remote_host' => 'server: host name; default localhost',
'--script_user' => 'server: OS user name; default current user',
'--aegir_root' => 'server: Aegir root; default /var/aegir',
'--backup_path' => 'server: Aegir backup path; default {aegir_root}/backup',
'--config_path' => 'server: Aegir configuration path; default {aegir_root}/config',
'--master_url' => 'server: Hostmaster URL',
);
foreach (drush_command_invoke_all('provision_services') as $service => $default) {
......@@ -273,8 +271,15 @@ class provisionServer extends provisionEnvironment {
$this->type = 'server';
$this->setProperty('remote_host', 'localhost');
$this->setProperty('script_user', get_current_user());
$this->setProperty('aegir_root', '/var/aegir');
if ($this->name == '@server_localhost') {
$this->setProperty('aegir_root', '/var/aegir');
$this->setProperty('script_user', get_current_user());
}
else {
$this->aegir_root = d('@server_localhost')->aegir_root;
$this->script_user = d('@server_localhost')->script_user;
}
$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';
......
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