Ticket #37250: munin-config.diff

File munin-config.diff, 1.4 KB (added by raimue (Rainer Müller), 12 years ago)
  • Portfile

     
    55
    66name                munin
    77version             1.4.7
     8revision            1
    89categories          net
    910maintainers         alpha
    1011platforms           darwin
     
    7980destroot.keepdirs   ${destroot}${prefix}/var/log/munin \
    8081                    ${destroot}${prefix}/var/run/munin \
    8182                    ${destroot}${prefix}/etc/munin/plugins \
     83                    ${destroot}${prefix}/etc/munin/plugin-conf.d \
    8284                    ${destroot}${prefix}/var/munin \
    8385                    ${destroot}${prefix}/www/munin
    8486destroot.target     install-common-prime install-node-prime \
     
    134136    }
    135137}
    136138
     139post-activate {
     140    # Copy sample versions of config files into place
     141    if {![file exists ${prefix}/etc/munin/munin-node.conf]} {
     142        file copy ${prefix}/etc/munin/munin-node.conf.sample ${prefix}/etc/munin/munin-node.conf
     143    }
     144    if { [variant_isset server] } {
     145        if {![file exists ${prefix}/etc/munin/munin.conf]} {
     146            file copy ${prefix}/etc/munin/munin.conf.sample ${prefix}/etc/munin/munin.conf
     147        }
     148    }
     149}
     150
    137151notes "
    138152To detect supported Munin plugins please use the following command:
    139153
    140 sudo munin-node-configure --suggest --shell | sh
     154sudo -u munin munin-node-configure --suggest --shell | sudo sh
    141155"