Commit 81d391be authored by Jon Pugh's avatar Jon Pugh

Issue #2754069: Wrap the backend profile drupal install in a drush option so...

Issue #2754069: Wrap the backend profile drupal install in a drush option so that hostmaster can decide whether or not to install Drupal profile automaticlly.
parent 231cbbb1
......@@ -59,14 +59,23 @@ function drush_provision_drupal_provision_install() {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
// call a backend task to do the actual installation.
$result = provision_backend_invoke(d()->name, "provision-install-backend", array(), array('client_email' => drush_get_option('client_email')));
// pass the login link back to the front end.
drush_set_option('login_link', $result['context']['login_link']);
// Run Drupal installation if option was specified
if (drush_get_option('install_drupal', FALSE)) {
// call a backend task to do the actual installation.
$result = provision_backend_invoke(d()->name, "provision-install-backend", array(), array('client_email' => drush_get_option('client_email')));
// pass the login link back to the front end.
drush_set_option('login_link', $result['context']['login_link']);
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
drush_set_option('installed', TRUE, 'site');
}
else {
drush_log('skipping install due to missing drush option', 'devshop_log');
}
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
drush_set_option('installed', TRUE, 'site');
_provision_drupal_maintain_aliases();
}
/**
......@@ -74,10 +83,13 @@ function drush_provision_drupal_provision_install() {
* any changes to things such as available modules/ themes can take affect.
*/
function drush_provision_drupal_post_provision_install() {
drush_set_option('installed', TRUE, 'site');
_provision_drupal_rebuild_caches();
drush_set_option('packages', _scrub_object(provision_drupal_system_map()), 'site');
_provision_client_create_symlink();
drush_include_engine('drupal', 'cron_key');
// If Drupal profile was installed, rebuild drupal caches and save enabled packages for aegir.
if (drush_get_option('installed', FALSE, 'site')) {
_provision_drupal_rebuild_caches();
drush_set_option('packages', _scrub_object(provision_drupal_system_map()), 'site');
_provision_client_create_symlink();
drush_include_engine('drupal', 'cron_key');
}
}
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