Commit 98f584c3 authored by drumm's avatar drumm Committed by Neil Drumm

Get remote web restarting working again

parent ee14c7f1
......@@ -76,11 +76,11 @@ class provisionService_http_apache extends provisionService_http {
function parse_configs($cause_error = FALSE) {
// This is required to be configurable, due to the fact that different
// hosts might need to do this differently.
if (drush_is_local_host(drush_get_option('host-name', 'localhost'))) {
$return = drush_shell_exec(escapeshellcmd(drush_get_option('restart_cmd')));
if (drush_is_local_host(d()->remote_host)) {
$return = drush_shell_exec(escapeshellcmd(d()->restart_cmd));
}
else {
$return = drush_shell_exec('ssh ' . drush_get_option('ssh-options', '-o PasswordAuthentication=no') . ' %s %s', drush_get_option('script_user') . '@' . drush_get_option('web_host'), escapeshellcmd(drush_get_option('restart_cmd')));
$return = drush_shell_exec('ssh ' . drush_get_option('ssh-options', '-o PasswordAuthentication=no') . ' %s %s', d()->script_user . '@' . d()->remote_host, escapeshellcmd(d()->restart_cmd));
}
if (!$return) {
$msg = join("\n", drush_shell_exec_output());
......
......@@ -10,13 +10,13 @@ function drush_provision_hostmaster_install($site) {
}
$version = drush_get_option('version', 'HEAD');
$parent_path = drush_get_option('parent_path', drush_server_home());
$platform = drush_get_option(array('r', 'root'), $parent_path . '/' . 'hostmaster-' . $version);
$aegir_root = drush_get_option('aegir_root', drush_server_home());
$platform = drush_get_option(array('r', 'root'), $aegir_root . '/' . 'hostmaster-' . $version);
if (!drush_get_option('backend-only')) {
if (!function_exists('drush_make_drush_command')) {
drush_backend_invoke('dl', array('drush_make-' . drush_get_option('drush_make_version', '6.x-2.0-beta6'), 'destination' => $parent_path . '/.drush/'));
drush_backend_invoke('dl', array('drush_make-' . drush_get_option('drush_make_version', '6.x-2.0-beta6'), 'destination' => $aegir_root . '/.drush/'));
}
drush_print(dt("deploying hostmaster application"));
......@@ -41,12 +41,12 @@ function drush_provision_hostmaster_install($site) {
$data['provision-service-http'] = 'apache';
$data['provision-service-db'] = 'mysql';
$data['provision-context'] = 'server';
$data['parent_path'] = $parent_path;
$data['aegir_root'] = $aegir_root;
$data['script_user'] = drush_get_option('script_user', 'aegir');
$data['web_group'] = drush_get_option('web_group', _provision_default_web_group());
$data['web_port'] = drush_get_option('web_port', 80);
$data['config_path'] = drush_get_option('config_path', $parent_path . '/config');
$data['backup_path'] = drush_get_option('backup_path', $parent_path . '/backups');
$data['config_path'] = drush_get_option('config_path', $aegir_root . '/config');
$data['backup_path'] = drush_get_option('backup_path', $aegir_root . '/backups');
$data['drush_path'] = DRUSH_COMMAND;
// verify the server
......
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