I thought about that but I was hoping to not run two separate scripts. I
suppose I''ll follow that further.
Thanks,
Paul
-----Original Message-----
From: net-ssh-users-bounces at rubyforge.org
[mailto:net-ssh-users-bounces at rubyforge.org] On Behalf Of Zach Dennis
Sent: Wednesday, November 23, 2005 1:49 PM
To: net-ssh-users at rubyforge.org
Subject: Re: [Net-ssh-users] sftp failover?
Paul Voccio wrote:> All,
>
>
>
> I have a file I am pushing via sftp and I have a secondary site to
> failover to if the primary fails. However, because of the
''die'' in
> /Net/SSH/Perl.pm on line 204, if my primary site is down the script
> exits without attempting to failover to my secondary. What would the
> best way to get around this be without removing the die in Perl.pm?
>
You could catch the exit status of your program. If it doesn''t execute
successfully it should have a non-zero status. If it failed you could
automatically try the secondary.
Zach
_______________________________________________
Net-ssh-users mailing list
Net-ssh-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/net-ssh-users