summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gentoo.org>2009-12-01 18:31:23 +0000
committerTiago Cunha <tcunha@gentoo.org>2009-12-01 18:31:23 +0000
commitf4269a1046169859f661f501152cefe1238edf64 (patch)
treec0cdf4e6f34099ec39489f2b45d9879135d7e505 /net-analyzer/syweb/files
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-f4269a1046169859f661f501152cefe1238edf64.tar.gz
gentoo-2-f4269a1046169859f661f501152cefe1238edf64.tar.bz2
gentoo-2-f4269a1046169859f661f501152cefe1238edf64.zip
- Version bump.
- Remove old. (Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/syweb/files')
-rw-r--r--net-analyzer/syweb/files/postinstall-en.txt7
-rw-r--r--net-analyzer/syweb/files/reconfig20
-rw-r--r--net-analyzer/syweb/files/syweb-class_lexer.inc.patch14
-rw-r--r--net-analyzer/syweb/files/syweb-setup.inc.patch25
-rw-r--r--net-analyzer/syweb/files/syweb-total_firewall.layout.patch30
5 files changed, 23 insertions, 73 deletions
diff --git a/net-analyzer/syweb/files/postinstall-en.txt b/net-analyzer/syweb/files/postinstall-en.txt
index 7b369e900a1e..291d66d4e381 100644
--- a/net-analyzer/syweb/files/postinstall-en.txt
+++ b/net-analyzer/syweb/files/postinstall-en.txt
@@ -1,9 +1,8 @@
Test your syweb installation by pointing your browser to the URL
http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/configtest.php
-Customize syweb by editing the file ${MY_INSTALLDIR}/setup.inc.
-
If you don't want any user interaction, move index_noui.php to index.php.
-NOTE that syweb expects a machine/*.rrd style directory structure under
-/var/lib/symon/rrds.
+syweb expects a <host>/*.rrd style directory structure under
+/var/lib/symon/rrds. Customize ${MY_INSTALLDIR}/setup.inc
+if this is incorrect for your setup.
diff --git a/net-analyzer/syweb/files/reconfig b/net-analyzer/syweb/files/reconfig
new file mode 100644
index 000000000000..79324cc1c7d0
--- /dev/null
+++ b/net-analyzer/syweb/files/reconfig
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+die() {
+ echo "#####"
+ echo $1
+ echo "#####"
+ exit 1
+}
+
+sed_var() {
+ sed -i "/\\$symon['$1']/s|=.*|='$2';|" "${MY_INSTALLDIR}"/setup.inc \
+ || die "sed $1 failed"
+}
+
+[[ $1 == "clean" ]] && exit 0
+
+sed_var rrdtool_path /usr/bin/rrdtool
+sed_var cache_dir "${VHOST_ROOT}"/syweb/cache
+sed_var host_tree /var/lib/symon/rrds
+sed_var layout_dir "${VHOST_ROOT}"/syweb
diff --git a/net-analyzer/syweb/files/syweb-class_lexer.inc.patch b/net-analyzer/syweb/files/syweb-class_lexer.inc.patch
deleted file mode 100644
index 425e9f4b18f8..000000000000
--- a/net-analyzer/syweb/files/syweb-class_lexer.inc.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-# Comment layout test since they aren't installed by default (prevents
-# configtest.php from failing).
-
---- syweb/htdocs/syweb/class_lexer.inc.orig 2007-04-30 21:04:45.004493630 +0100
-+++ syweb/htdocs/syweb/class_lexer.inc 2007-04-30 21:04:59.267317747 +0100
-@@ -245,7 +245,7 @@
- function _test() {
- global $symon;
-
-- $this->load('hifn_test.layout');
-+ /* $this->load('hifn_test.layout'); */
- while(!$this->eof) {
- $token = $this->next_token();
- }
diff --git a/net-analyzer/syweb/files/syweb-setup.inc.patch b/net-analyzer/syweb/files/syweb-setup.inc.patch
deleted file mode 100644
index 578939736061..000000000000
--- a/net-analyzer/syweb/files/syweb-setup.inc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-# Rename directories to reflect the changes from the ebuild and the
-# configuration files.
-
---- syweb/htdocs/syweb/setup.inc.orig 2008-12-13 12:48:28.165799500 +0000
-+++ syweb/htdocs/syweb/setup.inc 2008-12-13 12:50:09.972014770 +0000
-@@ -32,11 +32,18 @@
- $symon['layout_dir']='/var/www/symon';
- */
-
--/* running FreeBSD, apache not chrooted: */
-+/* running FreeBSD, apache not chrooted:
- $symon['rrdtool_path']='/usr/local/bin/rrdtool';
- $symon['cache_dir']='/usr/local/www/symon/cache';
- $symon['host_tree']='/usr/local/www/symon/rrds';
- $symon['layout_dir']='/usr/local/www/symon';
-+*/
-+
-+/* running Linux, apache not chrooted: */
-+$symon['rrdtool_path']='/usr/bin/rrdtool';
-+$symon['cache_dir']='/var/www/localhost/syweb/cache';
-+$symon['host_tree']='/var/lib/symon/rrds';
-+$symon['layout_dir']='/var/www/localhost/htdocs/syweb/layouts';
-
- $symon['cache_duration']=20;
- $symon['isolate_hosts']=1;
diff --git a/net-analyzer/syweb/files/syweb-total_firewall.layout.patch b/net-analyzer/syweb/files/syweb-total_firewall.layout.patch
deleted file mode 100644
index 75c449fc08ea..000000000000
--- a/net-analyzer/syweb/files/syweb-total_firewall.layout.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-# Convert BSD devices to Linux.
-# Rename directories to reflect the changes from the ebuild and the
-# configuration files.
-
---- syweb/symon/total_firewall.layout.orig 2007-04-30 19:13:12.967405846 +0100
-+++ syweb/symon/total_firewall.layout 2007-04-30 19:14:55.872706997 +0100
-@@ -8,15 +8,15 @@
- </div>";
-
- group name="interfaces", start=1017942400, end=-1;
--graph rrdfile=/symon/rrds/www/if_de0.rrd, title="external if on dikkeaap";
--graph rrdfile=/symon/rrds/www/if_xl0.rrd, title="internal if on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/if_eth0.rrd, title="external if on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/if_eth1.rrd, title="internal if on dikkeaap";
-
- group name="cpu and memory", start=1017942400, end=-1;
--graph rrdfile=/symon/rrds/www/cpu0.rrd, title="cpu(0) on dikkeaap";
--graph rrdfile=/symon/rrds/www/mem.rrd, title="mem on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/cpu0.rrd, title="cpu(0) on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/mem.rrd, title="mem on dikkeaap";
-
- group name="disks", start=1017942400, end=-1;
--graph rrdfile=/symon/rrds/www/io_wd0.rrd, title="disk 0 on dikkeaap";
--graph rrdfile=/symon/rrds/www/io_wd1.rrd, title="disk 1 on dikkeaap";
--graph rrdfile=/symon/rrds/www/io_wd2.rrd, title="disk 2 on dikkeaap";
--graph rrdfile=/symon/rrds/www/io_wd3.rrd, title="disk 3 on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/io_hda.rrd, title="disk 0 on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/io_hdb.rrd, title="disk 1 on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/io_hdc.rrd, title="disk 2 on dikkeaap";
-+graph rrdfile=/var/lib/symon/rrds/www/io_hdd.rrd, title="disk 3 on dikkeaap";