Sha256: e00c077a7622f8819ff2915ea642fcb5f884aa93e83990d9054db7dd82ed65e2
Contents?: true
Size: 962 Bytes
Versions: 37
Compression:
Stored size: 962 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} #{script} $*") end end %> # Active rubber plugins: <%= Dir["#{plugin_dir}/#{plugin_prefix}*"].collect {|f| File.basename(f) }.join(", ") %>
Version data entries
37 entries across 37 versions & 5 rubygems