Skip to content

Commit

Permalink
Fix move command logging, config to control IPv6 usage
Browse files Browse the repository at this point in the history
  • Loading branch information
verma committed May 26, 2014
1 parent b121430 commit 83a195e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"config-data-dir": "/change/this/to/some/dir",
"sftp-host": "sftp.example.com",
"sftp-port": 22,
"use-ipv6": false,
"username": "guest",
"private-key": "/path/to/private/key",
"base-path": "./some/dir",
Expand Down
1 change: 1 addition & 0 deletions src/dakait/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
(def defaults { :server-name "Server"
:sftp-port 22
:concurrency 4
:use-ipv6 false
:local-base-path "."
:username (System/getProperty "user.name")
:push-path "."
Expand Down
1 change: 1 addition & 0 deletions src/dakait/downloader.clj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
os-dest (os-proof dest)
scp-command (list "scp"
"-i" (config :private-key) ;; identity file
(if (config :use-ipv6) "-6" "-4") ;; use appropriate flag to force IP version selection
"-B" ;; batch run
"-r" ;; recursive if directory
"-o" "StrictHostKeyChecking=no"
Expand Down
3 changes: 2 additions & 1 deletion src/dakait/staging.clj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
(.mkdirs (io/file dest))
(with-programs [mv]
(info "Moving " src " -> " dest)
(mv src dest {:verbose true})))
(let [r (mv src dest {:verbose true})]
(info "Move status: " r))))

(defn stage-file
"Helps stage the file, triggers download of the file to the staged configuration area, once the
Expand Down

0 comments on commit 83a195e

Please sign in to comment.