diff options
author | Mark Felder <feld@FreeBSD.org> | 2016-03-20 18:39:54 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2016-03-20 18:39:54 +0000 |
commit | 639496935fcaa039813cea10f40b9c73b8b51aca (patch) | |
tree | ce152ba3adaf06249ccc6f3325b2f51e00708d94 /net-mgmt/guifi-snpservices/files | |
parent | 930811e71f6a30cf3c7450a9ed6cef8b8ebf54da (diff) | |
download | ports-639496935fcaa039813cea10f40b9c73b8b51aca.tar.gz ports-639496935fcaa039813cea10f40b9c73b8b51aca.zip |
Notes
Diffstat (limited to 'net-mgmt/guifi-snpservices/files')
4 files changed, 28 insertions, 22 deletions
diff --git a/net-mgmt/guifi-snpservices/files/patch-common-ping.sh b/net-mgmt/guifi-snpservices/files/patch-common-ping.sh index 6da57a01b14e..dd95d0408e1a 100644 --- a/net-mgmt/guifi-snpservices/files/patch-common-ping.sh +++ b/net-mgmt/guifi-snpservices/files/patch-common-ping.sh @@ -1,5 +1,5 @@ ---- ./common/ping.sh.orig 2014-02-21 15:53:13.000000000 +0000 -+++ ./common/ping.sh 2014-04-10 14:19:56.000000000 +0000 +--- ./common/ping.sh.orig 2015-05-22 23:50:50.000000000 +0100 ++++ ./common/ping.sh 2016-01-31 18:07:24.559136016 +0000 @@ -1,15 +1,15 @@ #!/bin/sh - PING="/bin/ping" @@ -18,5 +18,5 @@ - if [ $LOSS = 100 ]; + if [ "$LOSS" = 100 ]; then - echo 0 - else + echo 0 + echo ",$ADDR," >> /tmp/blacklist.snmp diff --git a/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php b/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php deleted file mode 100644 index a2fc3c710268..000000000000 --- a/net-mgmt/guifi-snpservices/files/patch-common-refresh_mrtg.php +++ /dev/null @@ -1,11 +0,0 @@ ---- common/refresh_mrtg.php.orig 2014-04-10 12:44:08.000000000 +0000 -+++ common/refresh_mrtg.php 2014-04-10 12:44:27.000000000 +0000 -@@ -29,7 +29,7 @@ - - echo "Getting MRTG CSV file\n"; - $hcnml = @fopen($MRTGConfigSource, "r"); -- $wcnml = @fopen("../data/guifi_mrtg.csv", "w"); -+ $wcnml = @fopen("/var/tmp/snpservices/data/guifi_mrtg.csv", "w"); - while (!feof($hcnml)) { - $buffer = fgets($hcnml, 4096); - fwrite($wcnml,$buffer); diff --git a/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php b/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php index a399bded50f7..680846d4e2dd 100644 --- a/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php +++ b/net-mgmt/guifi-snpservices/files/patch-graphs-mrtgcsv2mrtgcfg.php @@ -1,6 +1,6 @@ ---- graphs/mrtgcsv2mrtgcfg.php.orig 2014-02-21 15:53:13.000000000 +0000 -+++ graphs/mrtgcsv2mrtgcfg.php 2014-04-10 12:35:33.000000000 +0000 -@@ -1,9 +1,9 @@ +--- ./graphs/mrtgcsv2mrtgcfg.php.orig 2015-06-16 21:14:01.000000000 +0100 ++++ ./graphs/mrtgcsv2mrtgcfg.php 2016-01-31 18:18:04.779135280 +0000 +@@ -1,20 +1,20 @@ <?php -if (file_exists("../common/config.php")) { @@ -12,13 +12,29 @@ + include_once(dirname(__FILE__)."/../common/config.php.template"); } - $now = time(); -@@ -57,7 +57,7 @@ - print date('Y/m/d H:i:s')."\n"; + function mrtgcfg_from_mrtgcsv($rrdtool_header,$rrdimg_path,$rrddb_path,$mrtg_traffic_template,$mrtg_ping_template) { - $hf = @fopen($MRTGConfigSource,"r") or die('Error reading MRTG csv input\n"'); + if (!file_exists('/tmp/blacklist.ips')) +- system('/bin/touch /tmp/blacklist.ips'); ++ system('/usr/bin/touch /tmp/blacklist.ips'); + +- system('/bin/grep -vf /tmp/blacklist.ips /tmp/mrtg.csv > /tmp/mrtg.blacklisted.csv'); ++ system('/usr/bin/grep -vf /tmp/blacklist.ips /tmp/mrtg.csv > /tmp/mrtg.blacklisted.csv'); + + $hf = @fopen('/tmp/mrtg.blacklisted.csv','r'); -$cf = @fopen('../data/mrtg.cfg','w+'); +$cf = @fopen('/var/tmp/snpservices/data/mrtg.cfg','w+'); fputs($cf,sprintf($rrdtool_header,$rrdimg_path,$rrdimg_path,$rrddb_path,$rrddb_path)); +@@ -96,8 +96,8 @@ + if ($argv[1]=="CACHE") { + if (file_exists('/tmp/blacklist.ips')) { + $blacklist_time = filemtime('/tmp/blacklist.ips'); +- if (file_exists('../data/mrtg.cfg')) { +- $mrtg_time = filemtime('../data/mrtg.cfg'); ++ if (file_exists('/var/tmp/snpservices/data/mrtg.cfg')) { ++ $mrtg_time = filemtime('/var/tmp/snpservices/data/mrtg.cfg'); + } else { + $mrtg_time = 0; + echo "No mrtg.cfg file present, refreshing...\n"; diff --git a/net-mgmt/guifi-snpservices/files/pkg-message.in b/net-mgmt/guifi-snpservices/files/pkg-message.in index ececebcdce1d..9a485071132a 100644 --- a/net-mgmt/guifi-snpservices/files/pkg-message.in +++ b/net-mgmt/guifi-snpservices/files/pkg-message.in @@ -20,6 +20,7 @@ POST-INSTALL CONFIGURATION FOR GUIFI SNPSERVICES For more information, see various guifi.net doc pages, and related: + https://guifi.net/en/node/72593 http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas_1 http://es.wiki.guifi.net/wiki/Servidor_de_gr%C3%A1ficas_2 |