summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:32:40 +0100
committerPaul Buetow (uranus) <paul@buetow.org>2015-10-18 11:32:40 +0100
commitb3c43baa3eb2afef0f017a5d4bc8329ffe8a8035 (patch)
tree9c6e9c5e90603794dde5d4b12fb918c0199c79d1
parent3b105ce6d00260229eefdadfc94db94bddc9eb99 (diff)
refactor
-rwxr-xr-xrubyfy.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/rubyfy.rb b/rubyfy.rb
index 939cd84..2bf679a 100755
--- a/rubyfy.rb
+++ b/rubyfy.rb
@@ -104,8 +104,9 @@ private
log(:VERBOSE,"#{server}::Connecting")
sudo = root ? "sudo " : ""
Net::SSH.start(server, user) do |session|
- log(:VERBOSE, "#{server}::Executing #{sudo}#{command}")
- session.exec!("#{sudo}sh -c \"#{command}\"") do |channel, stream, data|
+ exec_command = "#{sudo}sh -c \"#{command}\""
+ log(:VERBOSE, "#{server}::Executing #{exec_command}")
+ session.exec!(exec_command) do |channel, stream, data|
log(:OUT, "#{server}::#{data}") unless @conf["silent"]
end
end