service('file')->unlink(drush_get_option('backup_file')) ->succeed('Removed unused migration site package') ->fail('Could not remove unused migration site package'); d()->service('http')->create_site_config(); _provision_apache_restart_apache(); } /** * Switch the migrate directories around now that we have the new db installed */ function drush_provision_drupal_provision_migrate($platform) { drush_backend_invoke('provision-deploy', array(drush_get_option('backup_file'), 'root' => $platform, 'web_host' => drush_get_option('web_host'), 'db_host' => drush_get_option('db_host'), 'profile' => drush_get_option('profile'))); } /** * Delete the old site directory and recreate the settings file */ function drush_provision_drupal_post_provision_migrate() { drush_set_option('installed', FALSE); // we remove the aliases even if redirection is enabled as a precaution // if redirection is enabled, keep silent about errors _provision_drupal_delete_aliases(drush_get_option('aliases', array()), drush_get_option('redirection')); _provision_recursive_delete(d()->root . '/sites/' . d()->uri); }