aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorDuane Hughes <duanejevon@gmail.com>2011-01-28 09:30:25 +0000
committerJeff Bilyk <jbilyk@gmail.com>2011-02-07 20:17:37 +0000
commitba462ea1ea2e52e0875284808d00d860f9f3f16b (patch)
tree339f493aeb7433f2b5f36aa27b35b8b1104c34d5 /testing
parent6c0ab9639bb90eb0b04d1f8414787ccc5e2eae08 (diff)
downloadaports-ba462ea1ea2e52e0875284808d00d860f9f3f16b.tar.bz2
aports-ba462ea1ea2e52e0875284808d00d860f9f3f16b.tar.xz
testing/logcheck: new aport
bash scripts for checking log files, ported from debian
Diffstat (limited to 'testing')
-rw-r--r--testing/logcheck/APKBUILD30
-rw-r--r--testing/logcheck/logcheck.cron.d9
-rw-r--r--testing/logcheck/logcheck.post-install3
-rw-r--r--testing/logcheck/logcheck.pre-install5
4 files changed, 47 insertions, 0 deletions
diff --git a/testing/logcheck/APKBUILD b/testing/logcheck/APKBUILD
new file mode 100644
index 0000000000..e437f2c788
--- /dev/null
+++ b/testing/logcheck/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Duane Hughes <duanejevon@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=logcheck
+pkgver=1.3.13
+pkgrel=0
+pkgdesc="Bash scripts used to monitor system log files for anomalies"
+url="http://packages.debian.org/source/sid/logcheck"
+arch="noarch"
+license="GPL"
+depends="lockfile-progs"
+makedepends=
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://ftp.debian.org/debian/pool/main/l/logcheck/${pkgname}_$pkgver.tar.gz
+ logcheck.cron.d
+ "
+
+_builddir="$srcdir"/$pkgname
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -D -m 644 "$srcdir"/logcheck.cron.d "$pkgdir"/etc/logcheck/logcheck.cron.sample
+ install -d "$pkgdir"/usr/share/man
+ cp -a "$_builddir"/docs/* "$pkgdir"/usr/share/man
+}
+
+md5sums="e2ff14f522bf2e30d5947c85fed44973 logcheck_1.3.13.tar.gz
+89be84c722a958659df9a937826cbdc2 logcheck.cron.d"
diff --git a/testing/logcheck/logcheck.cron.d b/testing/logcheck/logcheck.cron.d
new file mode 100644
index 0000000000..58cd047bb6
--- /dev/null
+++ b/testing/logcheck/logcheck.cron.d
@@ -0,0 +1,9 @@
+# /etc/cron.d/logcheck: crontab entries for the logcheck package
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+
+@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
+2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
+
+# EOF
diff --git a/testing/logcheck/logcheck.post-install b/testing/logcheck/logcheck.post-install
new file mode 100644
index 0000000000..c3439021c3
--- /dev/null
+++ b/testing/logcheck/logcheck.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+chown -R logcheck /etc/logcheck /var/lock/logcheck /var/lib/logcheck
diff --git a/testing/logcheck/logcheck.pre-install b/testing/logcheck/logcheck.pre-install
new file mode 100644
index 0000000000..d6ea64154d
--- /dev/null
+++ b/testing/logcheck/logcheck.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup logcheck 2>/dev/null
+adduser -S -H -h /dev/null -s /bin/false -D -G logcheck logcheck 2>/dev/null
+exit 0