Permalink
Browse files

Merge pull request #146 from jasherai/master

be consistent within cluster_kick and reference the correct log file for the init system
  • Loading branch information...
2 parents 1bccd94 + fe19e85 commit 8e4b678f43b4acc509073fd2fb8d376b2b966757 @temujin9 temujin9 committed Aug 31, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/chef/knife/cluster_kick.rb
@@ -42,6 +42,11 @@ class ClusterKick < Chef::Knife::ClusterSsh
:description => "Where to find the pid file. Typically /var/run/chef/client.pid (init.d) or /etc/sv/chef-client/supervise/pid (runit)",
:default => "/etc/sv/chef-client/supervise/pid"
+ option :log_file,
+ :long => "--log_file",
+ :description => "Where to find the log file. Typically /var/run/chef/client.pid (init.d) or /etc/sv/chef-client/log/main/current (runit)",
+ :default => "/etc/sv/chef-client/log/main/current"
+
def run
@name_args = [ @name_args.join('-') ]
config[:display_target] = true
@@ -62,7 +67,7 @@ def run
# running
pid_file="<%= config[:pid_file] %>"
-log_file=/var/log/chef/client.log
+log_file=<%= config[:log_file] %>
declare tail_pid
@@ -76,7 +81,7 @@ def run
pipe=/tmp/pipe-$$
mkfifo $pipe
-tail -fn0 "$log_file" > $pipe &
+tail -Fn0 "$log_file" > $pipe &
tail_pid=$!

0 comments on commit 8e4b678

Please sign in to comment.