Commit 27244923 authored by drumm's avatar drumm Committed by Neil Drumm

Restart web remotely if not remote. Plays well with #802724.

parent b80eec89
......@@ -58,7 +58,12 @@ 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.
$return = drush_shell_exec(escapeshellcmd(drush_get_option('restart_cmd')));
if (drush_is_local_host(drush_get_option('web_host'))) {
$return = drush_shell_exec(escapeshellcmd(drush_get_option('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')));
}
if (!$return) {
$msg = join("\n", drush_shell_exec_output());
if ($cause_error) {
......
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