summaryrefslogtreecommitdiff
path: root/libre/metalog
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-12-23 13:57:12 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-12-23 13:57:12 -0500
commit8b46da37a3d01169292b7982818947a4219e1bec (patch)
tree41af66c556c4cdd42cf0a8512275f38c816eed6a /libre/metalog
parent8b024219267fe0dfe3a251ff966af66a1fd23d7b (diff)
parentf7ad7579f473125b44db30248841e2d452f9547e (diff)
downloadabslibre-8b46da37a3d01169292b7982818947a4219e1bec.tar.gz
abslibre-8b46da37a3d01169292b7982818947a4219e1bec.tar.bz2
abslibre-8b46da37a3d01169292b7982818947a4219e1bec.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/abslibre
Diffstat (limited to 'libre/metalog')
-rw-r--r--libre/metalog/PKGBUILD43
-rw-r--r--libre/metalog/metalog40
-rw-r--r--libre/metalog/metalog.confd8
3 files changed, 91 insertions, 0 deletions
diff --git a/libre/metalog/PKGBUILD b/libre/metalog/PKGBUILD
new file mode 100644
index 000000000..dee52d986
--- /dev/null
+++ b/libre/metalog/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 137711 2011-09-10 13:12:33Z pierre $
+# Maintainer: juergen <juergen@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=metalog
+pkgver=2.0
+pkgrel=2
+pkgdesc="Metalog is a modern replacement for syslogd and klogd"
+url="http://metalog.sourceforge.net"
+license=('GPL')
+arch=('i686' 'x86_64' 'mips64el')
+depends=('pcre')
+groups=('base')
+provides=('logger')
+replaces=('syslog-ng')
+conflicts=('syslog-ng')
+backup=('etc/metalog.conf' 'etc/conf.d/metalog')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-2.tar.xz"
+ 'metalog' 'metalog.confd')
+md5sums=('e948d10d780205eae17645c89aee1361'
+ 'cdd1d34eedbfbc2d9e659bf0a0f58f56'
+ '86bccd5a02996921e29eff8a0394d11f')
+
+build() {
+ cd $srcdir/$pkgname-2
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+}
+
+check() {
+ cd $srcdir/$pkgname-2
+ make check
+}
+
+package() {
+ cd $srcdir/$pkgname-2
+ make DESTDIR=$pkgdir install
+ install -D -m755 $srcdir/metalog $pkgdir/etc/rc.d/metalog
+ install -D -m644 $srcdir/metalog.confd $pkgdir/etc/conf.d/metalog
+ install -D -m644 metalog.conf $pkgdir/etc/metalog.conf
+
+}
+
diff --git a/libre/metalog/metalog b/libre/metalog/metalog
new file mode 100644
index 000000000..d30f47289
--- /dev/null
+++ b/libre/metalog/metalog
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/metalog ] && . /etc/conf.d/metalog
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/metalog`
+case "$1" in
+ start)
+ stat_busy "Starting Metalog"
+ [ -z "$PID" ] && /usr/sbin/metalog -B $METALOG_OPTS 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/metalog.pid
+ add_daemon metalog
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Metalog"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon metalog
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/libre/metalog/metalog.confd b/libre/metalog/metalog.confd
new file mode 100644
index 000000000..3d76ffab3
--- /dev/null
+++ b/libre/metalog/metalog.confd
@@ -0,0 +1,8 @@
+#
+# Parameters to be passed to metalog
+#
+
+# NOTE: Since v.0.7, metalog disables buffering by default.
+# Add '-a' if you want buffering.
+
+METALOG_OPTS=""