[Prophet] publish with non-standard SSH port

Jesse Vincent jesse at bestpractical.com
Wed Jul 21 17:19:07 EDT 2010


Thanks! Applied.


On Wed, Jul 21, 2010 at 12:11:53PM +0200, Stephane wrote:
> Hello,
> 
> Prophet::CLI::PublishCommand doesn't have an option to specify an
> alternate port for SSH, or an alternate "-e" remote shell for rsync.
> 
> I've attached a small patch which adds a new "publish-shell" option
> for a replica:
> 
>   [replica "example"]
>      publish-shell = ssh -p 62822
>      publish-url = ....
> 
> I've tested the patch with SD and it appears to work.
> Stéphane
> 
> 
> 
> PS: syncwith.us is not accessible from where I am, apparently due to
> a missing glue record for ns1.syncwith.us.

> From 88f6bd959a8b7d2e6b3fd658366e37934c10fefd Mon Sep 17 00:00:00 2001
> From: Stephane Alnet <stephane at shimaore.net>
> Date: Wed, 21 Jul 2010 11:56:02 +0200
> Subject: [PATCH] Add support for rsync remote-shell
> 
> ---
>  lib/Prophet/CLI/Command/Publish.pm |    4 ++++
>  lib/Prophet/CLI/PublishCommand.pm  |    2 ++
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/Prophet/CLI/Command/Publish.pm b/lib/Prophet/CLI/Command/Publish.pm
> index c04676b..b205517 100644
> --- a/lib/Prophet/CLI/Command/Publish.pm
> +++ b/lib/Prophet/CLI/Command/Publish.pm
> @@ -30,6 +30,9 @@ sub run {
>      my %previous_sources_by_name
>          = $self->app_handle->config->sources( variable => 'publish-url' );
>  
> +    my %shell_by_name
> +        = $self->app_handle->config->sources( variable => 'publish-shell' );
> +
>      my $to = exists $previous_sources_by_name{$self->arg('to')}
>          ? $previous_sources_by_name{$self->arg('to')}
>          : $self->arg('to');
> @@ -62,6 +65,7 @@ sub run {
>      $self->publish_dir(
>          from => $from,
>          to   => $to,
> +        shell => $shell_by_name{$self->arg('to')},
>      );
>  
>      print "Publication complete.\n";
> diff --git a/lib/Prophet/CLI/PublishCommand.pm b/lib/Prophet/CLI/PublishCommand.pm
> index 7f2eaeb..46291b2 100644
> --- a/lib/Prophet/CLI/PublishCommand.pm
> +++ b/lib/Prophet/CLI/PublishCommand.pm
> @@ -59,6 +59,8 @@ END_WARNING
>          }
>      }
>      
> +    push @args, '-e', $args{shell} if defined $args{shell};
> +
>      push @args, '--recursive', '--' , $args{from}, $args{to};
>  
>      my $ret = system($rsync, @args);
> -- 
> 1.7.1
> 

> _______________________________________________
> Prophet mailing list
> Prophet at bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/prophet


-- 


More information about the Prophet mailing list