1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="A lighweight system monitoring tool"
10 HOMEPAGE="http://www.monitorix.org/"
11 SRC_URI="http://www.monitorix.org/${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="evms hddtemp lm_sensors"
18 RDEPEND="net-analyzer/rrdtool[perl]
22 hddtemp? ( app-admin/hddtemp )
23 lm_sensors? ( sys-apps/lm_sensors )
24 || ( sys-process/bcron
28 sys-process/vixie-cron )"
33 sed -i -e "s|\(our \$OSTYPE = \"Linux-\)RHFC|\1Gentoo|" ${PN}.conf \
40 dosbin ${PN}.pl || die "dosbin failed"
42 newinitd ports/Linux-Gentoo/${PN}.init ${PN} || die "newinitd failed"
45 doins ${PN}.conf || die "doins failed"
47 dodoc Changes ${PN}-apache.conf README{,.nginx} TODO \
48 ${PN}-alert.sh || die "dodoc failed"
49 doman man/man5/${PN}.conf.5 || die "doman failed"
51 insinto "${MY_HTDOCSDIR}"
52 doins logo_bot.png logo_top.png monitorixico.png || die "doins failed"
53 dodir "${MY_HTDOCSDIR}/imgs" || die "dodir failed"
54 webapp_serverowned "${MY_HTDOCSDIR}/imgs"
56 exeinto ${MY_CGIBINDIR}
57 doexe ${PN}.cgi || die "doexe failed"
59 dodir /var/lib/${PN}/usage || die "dodir failed"
60 insinto /var/lib/${PN}/reports
61 doins -r reports/* || die "doins failed"
66 elog "Before starting the ${PN} init script make sure you edited the "
67 elog "config file. After that you can start ${PN} by running"
68 elog "\t/etc/init.d/${PN} start"
69 elog "If you want to start it automatically on boot run"
70 elog "\trc-update add ${PN} default"
72 elog "This package is run via /etc/cron.d and therefore uses root "
73 elog "privileges to collect the informations. The graphs are created "
74 elog "at runtime directly to the imgs/ directory inside the dir you "
75 elog "installed the app to with webapp-config. These are created "
76 elog "with the privileges of the webserver user account."
78 elog "If you want to use the alert function (introduced in ${PN}-1.4.0), you "
79 elog "need to enable it in the config and provide a path to a script "
80 elog "which should be run in an alert case. An example script is provided "
81 elog "with this package."
83 elog "If you don't use sendmail be sure to set 'ENABLE_MAIL' to 'N' in the"