From 804a312b41fb5ca68da687f406abff506f7fe226 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Wed, 8 Jan 2014 14:19:28 +0000 Subject: Bug fixes after testing. --- byteback-backup | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'byteback-backup') diff --git a/byteback-backup b/byteback-backup index ffc4186..7494ad7 100755 --- a/byteback-backup +++ b/byteback-backup @@ -110,9 +110,11 @@ def ssh(*args) "-o", "BatchMode=yes", "-x", "-a", "-i", @ssh_key, - "-l", @destination_user + "-l", @destination_user, + @destination_host ] + - args + args. + map { |a| a ? a : "" } end error("Could not connect to #{@destination}") unless @@ -134,7 +136,7 @@ def rsync(*sources) "--rsync-path", "rsync --fake-super", "--rsh", - ssh.join(" "), + ssh[0..-2].join(" "), "--delete", "--one-file-system", "--relative" @@ -146,6 +148,7 @@ def rsync(*sources) args << @destination print args.map { |a| / /.match(a) ? "\"#{a}\"" : a }.join(" ")+"\n" if @verbose + system(*args) return $?.exitstatus -- cgit v1.2.3