summaryrefslogtreecommitdiff
path: root/byteback-receive
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-04-02 09:23:41 +0100
committerSteve Kemp <steve@steve.org.uk>2015-04-02 09:23:41 +0100
commit0b200b42b5a387adbf00ab6bcfb36101fee9c5c2 (patch)
treec3283b9e1fccf4d39ff4792164ba16f1a823965b /byteback-receive
parente254303eec822eb7f19ef7e37da0a0d4c5ff9182 (diff)
Removed commented out lines and updated headers.
Diffstat (limited to 'byteback-receive')
-rwxr-xr-xbyteback-receive9
1 files changed, 3 insertions, 6 deletions
diff --git a/byteback-receive b/byteback-receive
index 54163d6..b5e71a5 100755
--- a/byteback-receive
+++ b/byteback-receive
@@ -2,8 +2,7 @@
#
# Program to receive backups and run rsync in receive mode. Must check that
# user as authorised by SSH is allowed to access particular directory.
-
-#STDERR.print ARGV.inspect + "\n"
+#
$LOAD_PATH.unshift("/usr/lib/byteback")
@@ -11,21 +10,19 @@ require 'trollop'
require 'byteback'
include Byteback::Log
-#debug "ARGV=#{ARGV.inspect}\nSSH_ORIGINAL_COMMAND=#{ENV['SSH_ORIGINAL_COMMAND']}\n"
if ENV['SSH_ORIGINAL_COMMAND']
ARGV.concat(ENV['SSH_ORIGINAL_COMMAND'].split(" "))
end
-#STDERR.print "after ARGV=#{ARGV.inspect}\n"
-
byteback_host = ENV['BYTEBACK_HOST']
fatal("BYTEBACK_HOST environment not set") unless byteback_host
byteback_root = ENV['HOME'] + "/" + ENV["BYTEBACK_HOST"]
fatal("#{byteback_root} does not exist") unless File.directory?(byteback_root)
-# force destination to be where we expect
+#
+# force the destination to be where we expect
#
if ARGV[0] == 'rsync'
ARGV[-1] = "#{byteback_root}/current"