Commit 03be5425 authored by drumm's avatar drumm Committed by Neil Drumm

Remote web bugfix, platforms verify now

parent ff90eecd
......@@ -8,7 +8,7 @@ class provisionService_file_remote extends provisionService_file {
}
function sync() {
if (!drush_shell_exec('rsync -azC --delete %s/ %s@%s:%s', $this->config_path, d()->script_user, d()->remote_host, $this->remote_config_path)) {
if (!drush_shell_exec('rsync -azC --delete %s/ %s@%s:%s', $this->config_path, $this->script_user, $this->remote_host, $this->remote_config_path)) {
return drush_set_error('PROVISION_FILE_SYNC_FAILED', dt("Files could not be synced to remote server. Changes might not be available until this has been done. (error: %msg)", array("%msg" => join("\n", drush_shell_exec_output()))));
}
else {
......
......@@ -39,7 +39,6 @@ class provisionService_http_apache extends provisionService_http {
return $config->unlink();
}
function create_server_config() {
$config = new provisionConfig_apache_server($this->context);
return $config->write();
......@@ -70,18 +69,18 @@ class provisionService_http_apache extends provisionService_http {
break;
}
d()->service('file')->sync();
$this->parse_configs();
}
function parse_configs($cause_error = FALSE) {
d()->service('file')->sync();
// This is required to be configurable, due to the fact that different
// hosts might need to do this differently.
if (drush_is_local_host(d()->remote_host)) {
$return = drush_shell_exec(escapeshellcmd(d()->restart_cmd));
if (drush_is_local_host($this->remote_host)) {
$return = drush_shell_exec(escapeshellcmd($this->restart_cmd));
}
else {
$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));
$return = drush_shell_exec('ssh ' . drush_get_option('ssh-options', '-o PasswordAuthentication=no') . ' %s %s', $this->script_user . '@' . $this->remote_host, escapeshellcmd($this->restart_cmd));
}
if (!$return) {
$msg = join("\n", drush_shell_exec_output());
......
......@@ -248,8 +248,7 @@ class provisionServer extends provisionEnvironment {
if ($service === 'file') {
// Force provision-save local
$command = drush_get_command();
$command = explode(" ", $command['command']);
if (preg_match("/^provision-save/", $command[0])) {
if (preg_match("/^provision-save\b/", $command['command'])) {
$type = 'local';
}
}
......
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