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? paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/net-ssh-users/attachments/20051123/9e9ccba4/attachment.htm
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