Skip to content

Commit d5058bc

Browse files
committed
Merge pull request #4 from pantheon-systems/ssh_onebox
Include specific ssh connection info for onebox
2 parents 9d74592 + 16977f3 commit d5058bc

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

php/commands/drush.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ function __invoke( $args, $assoc_args ) {
4242
'host' => "appserver.$environment.$site->site_uuid.drush.in",
4343
'port' => '2222'
4444
);
45+
46+
if (strpos(TERMINUS_HOST, 'onebox') !== FALSE) {
47+
$server['user'] = "appserver.$environment.$site->site_uuid";
48+
$server['host'] = TERMINUS_HOST;
49+
}
50+
4551
# Sanitize assoc args so we don't try to pass our own flags.
4652
# TODO: DRY this out?
4753
unset($assoc_args['site']);

php/commands/wp.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ function __invoke( $args, $assoc_args ) {
4444
'port' => '2222'
4545
);
4646

47+
if (strpos(TERMINUS_HOST, 'onebox') !== FALSE) {
48+
$server['user'] = "appserver.$environment.$site->site_uuid";
49+
$server['host'] = TERMINUS_HOST;
50+
}
51+
4752
# Sanitize assoc args so we don't try to pass our own flags.
4853
# TODO: DRY this out?
4954
unset($assoc_args['site']);
@@ -61,7 +66,7 @@ function __invoke( $args, $assoc_args ) {
6166
$flags .= "--$k ";
6267
}
6368
}
64-
Terminus::line( "Running drush $command $flags on $site_name-$environment" );
69+
Terminus::line( "Running wp $command $flags on $site_name-$environment" );
6570
$this->send_command($server, 'wp', $args, $assoc_args );
6671

6772
}

0 commit comments

Comments
 (0)