lib/recipes/monit.rb in capitate-0.3.5 vs lib/recipes/monit.rb in capitate-0.3.6

- old
+ new

@@ -3,52 +3,33 @@ desc <<-DESC Restart (HUP) monit process. HUP's the process from the pid file, if it exists. - <dl> - <dt>monit_pid_path</dt> - <dd>Path to monit pid file</dd> - <dd class="default">Defaults to @/var/run/monit.pid@</dd> - </dl> "Source":#{link_to_source(__FILE__)} DESC + task_arg(:monit_pid_path, "Path to monit pid file", :default => "/var/run/monit.pid") task :restart do - fetch_or_default(:monit_pid_path, "/var/run/monit.pid") - - run_via %{sh -c "[ ! -e '#{monit_pid_path}' ] || kill -HUP `cat #{monit_pid_path}`"} - + run_via %{sh -c "[ ! -e '#{monit_pid_path}' ] || kill -HUP `cat #{monit_pid_path}`"} end desc <<-DESC Unmonitor all. - <dl> - <dt>monit_bin_path</dt> - <dd>Path to monit bin.</dd> - <dd>Defaults to @monit@</dd> - </dl> "Source":#{link_to_source(__FILE__)} DESC + task_arg(:monit_bin_path, "Path to monit bin.", :default => "monit") task :unmonitor_all do - fetch_or_default(:monit_bin_path, "monit") - run_via "#{monit_bin_path} unmonitor all" end desc <<-DESC Monitor all. - <dl> - <dt>monit_bin_path</dt> - <dd>Path to monit bin.</dd> - <dd>Defaults to @monit@</dd> - </dl> "Source":#{link_to_source(__FILE__)} DESC + task_arg(:monit_bin_path, "Path to monit bin.", :default => "monit") task :monitor_all do - fetch_or_default(:monit_bin_path, "monit") - run_via "#{monit_bin_path} monitor all" end end \ No newline at end of file