<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/1880b1b4790fedd843f0b01f5626e4fa5e433394">https://github.com/macports/macports-ports/commit/1880b1b4790fedd843f0b01f5626e4fa5e433394</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 1880b1b netmrg: Add modeline and adjust whitespace
</span>1880b1b is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 1880b1b4790fedd843f0b01f5626e4fa5e433394
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Sun Jul 29 18:23:30 2018 -0500
<span style='display:block; white-space:pre;color:#404040;'> netmrg: Add modeline and adjust whitespace
</span>---
net/netmrg/Portfile | 86 ++++++++++++++++++++++++++++-------------------------
1 file changed, 46 insertions(+), 40 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/netmrg/Portfile b/net/netmrg/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index e4d791e..fa64084 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/netmrg/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/netmrg/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,50 +1,56 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span>
name netmrg
version 0.20
categories net
<span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span> maintainers nomaintainer
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> description An RRDtool frontend for network monitoring, reporting, and graphing \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- that generates day/week/month MRTG style graphs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that generates day/week/month MRTG style graphs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> long_description ${description}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> homepage http://www.netmrg.net/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span> master_sites http://www.netmrg.net/download/release/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums md5 47bec3b8a4d3a5c06c70925ee8d280be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums md5 47bec3b8a4d3a5c06c70925ee8d280be
</span>
depends_lib path:bin/mysql_config5:mysql5 \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- port:rrdtool \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:libxml2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:rrdtool \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libxml2
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args --with-mysql_config=${prefix}/lib/mysql5/bin/mysql_config \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-snmp-lib-dir=/usr/lib \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --with-rrdtool=${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args --with-mysql_config=${prefix}/lib/mysql5/bin/mysql_config \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-snmp-lib-dir=/usr/lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-rrdtool=${prefix}/bin
</span>
post-extract {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|mysql/mysql.h|${prefix}/include/mysql5/mysql/mysql.h|g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/src/include/db.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|mysql/mysql.h|${prefix}/include/mysql5/mysql/mysql.h|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/src/include/db.h
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|<socket></socket>|<socket>${prefix}/var/run/mysql5/mysqld.sock</socket>|g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/etc/netmrg.xml.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|<socket></socket>|<socket>${prefix}/var/run/mysql5/mysqld.sock</socket>|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/etc/netmrg.xml.in
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|<version>1.0</version>|<version>1.2</version>|g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/etc/netmrg.xml.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|<version>1.0</version>|<version>1.2</version>|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/etc/netmrg.xml.in
</span> }
post-destroot {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${destroot}${prefix}/var/log/netmrg
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- destroot.keepdirs ${destroot}${prefix}/var/log/netmrg
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "chown -R www:www ${destroot}${prefix}/var/lib/netmrg/rrd/"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "chown -R www:www ${destroot}${prefix}/var/log/netmrg"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 -d ${destroot}${prefix}/var/log/netmrg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.keepdirs ${destroot}${prefix}/var/log/netmrg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "chown -R www:www ${destroot}${prefix}/var/lib/netmrg/rrd/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "chown -R www:www ${destroot}${prefix}/var/log/netmrg"
</span> }
post-activate {
ui_msg "\n
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ******************************************************************
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- **** Complete the NetMRG Installation ****
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ******************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ******************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ **** Complete the NetMRG Installation ****
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ******************************************************************
</span>
Full information at http://wiki.netmrg.net/wiki/Users_Manual.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -60,7 +66,7 @@ Full information at http://wiki.netmrg.net/wiki/Users_Manual.
</span> sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
Set the root MySQL password:
<span style='display:block; white-space:pre;background:#ffe0e0;'>- Follow the instructions that were given after you executed 'mysql_install_db' above.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Follow the instructions that were given after you executed 'mysql_install_db' above.
</span>
2) Install PHP 4 or 5 (not covered)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -71,13 +77,13 @@ Full information at http://wiki.netmrg.net/wiki/Users_Manual.
</span>
3) Setup the NetMRG database
<span style='display:block; white-space:pre;background:#ffe0e0;'>- mysql5 -u root -p
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- mysql> create database netmrg;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- mysql> exit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mysql5 -u root -p
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mysql> create database netmrg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mysql> exit
</span>
Import the netmrg database
<span style='display:block; white-space:pre;background:#ffe0e0;'>- cd ${prefix}/share/netmrg/db
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- cat netmrg.mysql | mysql5 -u root -p netmrg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cd ${prefix}/share/netmrg/db
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cat netmrg.mysql | mysql5 -u root -p netmrg
</span>
Verify NetMRG DB:
mysql5 -u root -p
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -86,29 +92,29 @@ Full information at http://wiki.netmrg.net/wiki/Users_Manual.
</span> mysql> exit;
Set permissions on the NetMRG database
<span style='display:block; white-space:pre;background:#ffe0e0;'>- grant all on netmrg.* to netmrg@localhost identified by 'mynetmrg-password';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ grant all on netmrg.* to netmrg@localhost identified by 'mynetmrg-password';
</span>
4) Set a symlink from the NetMRG web frontend to your Apache root directory
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sudo ln -s ${prefix}/var/www/netmrg/webfiles /<Apache Doc Root>/netmrg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo ln -s ${prefix}/var/www/netmrg/webfiles /<Apache Doc Root>/netmrg
</span>
5) Edit the NetMRG preferences file ${prefix}/etc/netmrg.xml
MySQL preferences:
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <user>netmrg</user> (MySQL user)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <password><my-netmrg-passsword></password> (MySQL password)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <db>netmrg</db> (MySQL database name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <user>netmrg</user> (MySQL user)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <password><my-netmrg-passsword></password> (MySQL password)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <db>netmrg</db> (MySQL database name)
</span>
Other preferences if desired: website, polling, and logging
6) Test polling and set polling in cron
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sudo -u www ${prefix}/bin/netmrg-gatherer -a (-a is for verbose output)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo -u www ${prefix}/bin/netmrg-gatherer -a (-a is for verbose output)
</span>
NOTE: If you do not run netmrg as user www, then set permissions to that user:
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sudo chown -R netmrg-user:netmrg-user ${prefix}/var/log/netmrg/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sudo chown -R netmrg-user:netmrg-user ${prefix}/var/lib/netmrg/rrd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo chown -R netmrg-user:netmrg-user ${prefix}/var/log/netmrg/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo chown -R netmrg-user:netmrg-user ${prefix}/var/lib/netmrg/rrd
</span>
Once you are satisfied polling is operating correctly, set the netmrg user's
crontab to poll every 5 minutes.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -120,13 +126,13 @@ Full information at http://wiki.netmrg.net/wiki/Users_Manual.
</span>
7) Point your web browser to http:/loalhost/netmrg and login to NetMRG
<span style='display:block; white-space:pre;background:#ffe0e0;'>- The default user/pass is admin/nimda
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The default user/pass is admin/nimda
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ******************************************************************
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- **** Graphing an Ethernet Switch - Quickstart ****
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ******************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ******************************************************************
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ **** Graphing an Ethernet Switch - Quickstart ****
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ******************************************************************
</span>
1) Define a custom graph template for your Ethernet switches
</pre><pre style='margin:0'>
</pre>