]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/nylon/nylon-statistics.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / nylon / nylon-statistics.bb
1 DESCRIPTION = "statistics & graphing for nylon"
2 RDEPENDS = "rrdtool"
3 SECTION = "base"
4 PRIORITY = "optional"
5 MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>"
6 LICENSE = "GPLv2"
7 PV = "cvs${CVSDATE}"
8 PR = "r1"
9
10 SRC_URI = "svn://meshcube.org/svn/application;module=${PN};proto=http"
11 S = "${WORKDIR}/${PN}"
12
13 do_install() {
14         install -d ${D}/srv/www/cgi-bin
15         install -d ${D}${sbindir}
16         ln -s /var/tmp ${D}/srv/www/rrd-img
17         install -m 755 ${S}/*.html ${D}/srv/www/cgi-bin
18         ln -s /var/tmp/nav.inc.html ${D}/srv/www/cgi-bin
19         install -m 755 ${S}/collect.sh ${D}${sbindir}
20 }
21
22 pkg_postinst() {
23 if test "x$D" != "x"; then
24         exit 1
25 else
26         if ! grep -q collect.sh /etc/cron/crontabs/root; then
27                 echo "adding crontab"
28                 test -d /etc/cron/crontabs || mkdir -p /etc/cron/crontabs
29                 echo "*/5 * * * *    ${sbindir}/collect.sh" >> /etc/cron/crontabs/root
30         fi
31         update-rc.d -s busybox-cron defaults
32         /etc/init.d/busybox-cron reload
33         if [ ! -e /etc/httpd.conf ]; then
34                 echo "A:*" > /etc/httpd.conf
35         fi      
36         update-rc.d -s busybox-httpd defaults
37         
38         if ! grep -q "/var/lib/rrd/" /etc/nylon/backup.list; then
39                 echo "adding to backup list"
40                 echo "/var/lib/rrd/" >> /etc/nylon/backup.list
41         fi
42 fi
43 }
44
45 FILES_${PN} += "/srv"