Commit 12fc22dd authored by Adrian Rossouw's avatar Adrian Rossouw

Migration between servers works. It now deletes the vhost file first, and if...

Migration between servers works. It now deletes the vhost file first, and if it gets recreated that's cool.
parent 703beac0
<?php
function drush_http_pre_provision_migrate() {
d()->service('http')->delete_site_config();
}
function drush_http_pre_provision_migrate_rollback() {
d()->service('http')->create_site_config();
}
......@@ -68,6 +68,12 @@ function drush_provision_drupal_provision_migrate($platform) {
}
}
/**
* Something went wrong
*/
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
*/
......@@ -77,6 +83,7 @@ function drush_provision_drupal_post_provision_migrate() {
// 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()->site_path);
d()->service('http')->sync(d()->site_path);
}
......@@ -403,7 +403,7 @@ class provisionServer extends provisionEnvironment {
}
}
else { // File does not exist, remove it.
if ($this->server()->shell_exec('rm -rf ' . escapeshellarg($path))) {
if ($this->shell_exec('rm -rf ' . escapeshellarg($path))) {
drush_log(dt('@path has been removed from remote server @remote_host.', array('@path' => $path, '@remote_host' => $this->remote_host)));
}
else {
......
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