summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorQian Lei <qianl.fnst@cn.fujitsu.com>2014-12-10 15:14:24 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-12-17 12:55:40 +0100
commit27d620aa172f8161685dcda832cf7cb480020a00 (patch)
tree144001d2e775d2a18784587a80e76142eee730ea /meta-oe
parentef21dc66105ad80702700a0e3feddc74a0215f41 (diff)
downloadmeta-openembedded-27d620aa172f8161685dcda832cf7cb480020a00.tar.gz
logwatch: Add new recipe
Logwatch is a customizable, pluggable log-monitoring system. It will go through your logs for a given period of time and make a report in the areas that you wish with the detail that you wish. Easy to use - works right out of the package on many systems. Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/logwatch/logwatch_7.4.1.bb58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/logwatch/logwatch_7.4.1.bb b/meta-oe/recipes-extended/logwatch/logwatch_7.4.1.bb
new file mode 100644
index 000000000..650d6f86e
--- /dev/null
+++ b/meta-oe/recipes-extended/logwatch/logwatch_7.4.1.bb
@@ -0,0 +1,58 @@
1SUMMARY = "A log file analysis program"
2DESCRIPTION = "\
3Logwatch is a customizable, pluggable log-monitoring system. It will go \
4through your logs for a given period of time and make a report in the areas \
5that you wish with the detail that you wish. Easy to use - works right out of \
6the package on many systems.\
7"
8SECTION = "devel"
9HOMEPAGE = "http://www.logwatch.org/"
10LICENSE = "MIT"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=f2566bb12b16d2d80d90ebc533261aa7"
12RDEPENDS_${PN} = "perl"
13
14SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BP}/${BP}.tar.gz"
15SRC_URI[md5sum] = "a0c3d8721f877bdcd4a9089eb1b4691b"
16SRC_URI[sha256sum] = "35ec31f9fe981aaa727b144ab3ff2eb655997d8ccabaf66586458f5dfc3a56eb"
17
18do_install() {
19 install -m 0755 -d ${D}${sysconfdir}/logwatch/scripts
20 install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/logfiles
21 install -m 0755 -d ${D}${datadir}/logwatch/dist.conf/services
22 install -m 0755 -d ${D}${localstatedir}/cache/logwatch
23 mv conf/ ${D}${datadir}/logwatch/default.conf
24 mv scripts/ ${D}${datadir}/logwatch/scripts
25 mv lib ${D}${datadir}/logwatch/lib
26
27 install -m 0755 -d ${D}${mandir}/man1
28 install -m 0755 -d ${D}${mandir}/man5
29 install -m 0755 -d ${D}${mandir}/man8
30 install -m 0644 amavis-logwatch.1 ${D}${mandir}/man1
31 install -m 0644 postfix-logwatch.1 ${D}${mandir}/man1
32 install -m 0644 ignore.conf.5 ${D}${mandir}/man5
33 install -m 0644 override.conf.5 ${D}${mandir}/man5
34 install -m 0644 logwatch.conf.5 ${D}${mandir}/man5
35 install -m 0644 logwatch.8 ${D}${mandir}/man8
36
37 install -m 0755 -d ${D}${sysconfdir}/cron.daily
38 install -m 0755 -d ${D}${sbindir}
39 ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sysconfdir}/cron.daily/0logwatch
40 ln -sf ../..${datadir}/logwatch/scripts/logwatch.pl ${D}${sbindir}/logwatch
41 cat > ${D}${sysconfdir}/cron.daily/0logwatch <<EOF
42 DailyReport=\`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"\`
43 if [ "\$DailyReport" != "No" ] && [ "\$DailyReport" != "no" ]
44 then
45 logwatch
46 fi
47EOF
48 chmod 755 ${D}${sysconfdir}/cron.daily/0logwatch
49
50 install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/logfiles
51 install -m 0755 -d ${D}${sysconfdir}/logwatch/conf/services
52 touch ${D}${sysconfdir}/logwatch/conf/logwatch.conf
53 touch ${D}${sysconfdir}/logwatch/conf/ignore.conf
54 touch ${D}${sysconfdir}/logwatch/conf/override.conf
55 echo "# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)" > ${D}${sysconfdir}/logwatch/conf/logwatch.conf
56 echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > ${D}${sysconfdir}/logwatch/conf/ignore.conf
57 echo "# Configuration overrides for specific logfiles/services may be placed here." > ${D}${sysconfdir}/logwatch/conf/override.conf
58}