Sha256: 6b51cf2e53509e4903b9a514cdd284401dfb032c2137d8bc5eabd61f9f13deed
Contents?: true
Size: 997 Bytes
Versions: 3
Compression:
Stored size: 997 Bytes
Contents
<% @path = "/etc/munin/plugin-conf.d/munin-node" @additive = ["# rubber-munin-plugins-start", "# rubber-munin-plugins-end"] @post = <<-POST /etc/init.d/munin-node restart POST root = RUBBER_ENV == 'development' ? "#{RUBBER_ROOT}/tmp/rubber" : "" script_dir = "#{RUBBER_ROOT}/script/munin" plugin_dir = "#{root}/etc/munin/plugins" plugin_prefix = "rubber_" %> <% # cleanup old plugins File.delete(*Dir["#{plugin_dir}/#{plugin_prefix}*"]) # for each script in our source tree, create a wrapper in # munin plgin dir so that we can set rails env Dir["#{script_dir}/*"].each do |script| plugin_name = plugin_prefix + File.basename(script) File.open("#{plugin_dir}/#{plugin_name}", 'w') do |p| p.chmod(0755) p.puts('#!/bin/sh') p.puts("RUBBER_ENV=#{RUBBER_ENV} #{rubber_env.ruby_prefix}/bin/ruby #{script} $*") end end %> # Active rubber plugins: <%= Dir["#{plugin_dir}/#{plugin_prefix}*"].collect {|f| File.basename(f) }.join(", ") %>
Version data entries
3 entries across 3 versions & 1 rubygems