Commit 4fca5bb7 authored by anarcat's avatar anarcat Committed by anarcat

delete redirection vhost when deleting ssl vhost

parent 36bcaed6
......@@ -99,7 +99,8 @@ function _provision_apache_delete_vhost_config($url) {
}
$file = $url . '_' . $options['site_port'];
provision_path("unlink", drush_get_option('vhost_path') ."/" . $file, TRUE, dt("Removed apache virtual host configuration"));
}
}
drush_command_invoke_all('provision_apache_delete_vhost', $url, $options);
}
/**
......
......@@ -31,3 +31,14 @@ function provision_ssl_provision_apache_vhost_config($url, $options) {
return NULL;
}
}
/**
* Implementation of hook_provision_apache_delete_vhost()
*
* This will delete the redirection vhost if it was created.
*/
function provision_ssl_provision_apache_delete_vhost($url, $options) {
if ($options['site_port'] == 443 && $options['ssl_redirect']) {
provision_path('unlink', drush_get_option('vhost_path') . '/' . $url . '_80', TRUE, NULL, t("Failed deleting redirection vhost."));
}
}
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