diff options
Diffstat (limited to 'sysutils/tenshi')
-rw-r--r-- | sysutils/tenshi/Makefile | 63 | ||||
-rw-r--r-- | sysutils/tenshi/distinfo | 2 | ||||
-rw-r--r-- | sysutils/tenshi/files/tenshi.sh | 34 | ||||
-rw-r--r-- | sysutils/tenshi/pkg-descr | 15 | ||||
-rw-r--r-- | sysutils/tenshi/pkg-plist | 3 |
5 files changed, 117 insertions, 0 deletions
diff --git a/sysutils/tenshi/Makefile b/sysutils/tenshi/Makefile new file mode 100644 index 000000000000..2274514cca44 --- /dev/null +++ b/sysutils/tenshi/Makefile @@ -0,0 +1,63 @@ +# New ports collection makefile for: tenshi +# Date created: 21 Jul 2004 +# Whom: Oliver Eikemeier +# +# $FreeBSD$ +# + +PORTNAME= tenshi +PORTVERSION= 0.3.1 +CATEGORIES= sysutils +MASTER_SITES= http://dev.gentoo.org/~lcars/%SUBDIR%/ +MASTER_SITE_SUBDIR= tenshi + +MAINTAINER= ports@FreeBSD.org +COMMENT= Tenshi is a log monitoring program, designed to watch multiple logs + +RUN_DEPENDS= ${LOCALBASE}/bin/gtail:${PORTSDIR}/sysutils/coreutils + +MAN8= tenshi.8 + +USE_PERL5= yes +NO_BUILD= yes +USE_RC_SUBR= yes + +SED_SCRIPT= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \ + -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%PERL%%,${PERL},g' + +PORTDOCS= README Changelog + +.include <bsd.port.pre.mk> + +.if ${PERL_LEVEL} < 500600 +IGNORE= requires are least Perl 5.6 +.endif + +.if ${PERL_LEVEL} < 500800 +RUN_DEPENDS+= ${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net +.endif + +post-patch: + @${PERL5} -pi.bak -e ' \ + s"/usr/bin/perl"${PERL}" if $$. == 1; \ + s"/etc/tenshi/tenshi\.conf"${PREFIX}/etc/tenshi.conf"; \ + s"/usr/bin/tail"${LOCALBASE}/bin/gtail"; \ + ' ${WRKSRC}/tenshi + +do-install: + @${INSTALL_SCRIPT} ${WRKSRC}/tenshi ${DESTDIR}${PREFIX}/bin + @${INSTALL_DATA} ${WRKSRC}/tenshi.conf ${DESTDIR}${PREFIX}/etc/tenshi.conf.sample + @${INSTALL_MAN} ${WRKSRC}/tenshi.8 ${DESTDIR}${MAN8PREFIX}/man/man8 +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @for doc in ${PORTDOCS}; do \ + ${INSTALL_DATA} ${WRKSRC}/$$doc ${DESTDIR}${DOCSDIR}; \ + done +.endif + +post-install: + @${SED} ${SED_SCRIPT} ${FILESDIR}/tenshi.sh >${WRKDIR}/tenshi.sh + @${INSTALL_SCRIPT} ${WRKDIR}/tenshi.sh ${PREFIX}/etc/rc.d + +.include <bsd.port.post.mk> diff --git a/sysutils/tenshi/distinfo b/sysutils/tenshi/distinfo new file mode 100644 index 000000000000..72a9cd5d0261 --- /dev/null +++ b/sysutils/tenshi/distinfo @@ -0,0 +1,2 @@ +MD5 (tenshi-0.3.1.tar.gz) = 533753fe46ae6b2e7a5334dd9ca292fa +SIZE (tenshi-0.3.1.tar.gz) = 21416 diff --git a/sysutils/tenshi/files/tenshi.sh b/sysutils/tenshi/files/tenshi.sh new file mode 100644 index 000000000000..5e3a6a882d5a --- /dev/null +++ b/sysutils/tenshi/files/tenshi.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: tenshi +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown + +# Add the following lines to /etc/rc.conf to enable `tenshi': +# +#tenshi_enable="YES" +# + +. '%%RC_SUBR%%' + +name='tenshi' +rcvar=`set_rcvar` + +extra_commands='reload' + +command='%%PREFIX%%/bin/tenshi' +command_interpreter='%%PERL%%' + +pidfile='/var/run/tenshi.pid' + +required_files='%%PREFIX%%/etc/tenshi.conf' + +# set defaults + +tenshi_enable="${tenshi_enable:-NO}" + +load_rc_config "$name" +run_rc_command "$1" diff --git a/sysutils/tenshi/pkg-descr b/sysutils/tenshi/pkg-descr new file mode 100644 index 000000000000..707615791383 --- /dev/null +++ b/sysutils/tenshi/pkg-descr @@ -0,0 +1,15 @@ +Tenshi is a log monitoring program, designed to watch one or more +log files for lines matching user defined regular expressions and +report on the matches. The regular expressions are assigned to +queues which have an alert interval and a list of mail recipients. + +Queues can be set to send a notification as soon as there is a log +line assigned to it, or to send periodic reports. + +Additionally, uninteresting fields in the log lines (such as PID +numbers) can be masked with the standard regular expression grouping +operators ( ). This allows cleaner and more readable reports. All +reports are separated by hostname and all messages are condensed +when possible. + +WWW: http://www.gentoo.org/proj/en/infrastructure/tenshi/ diff --git a/sysutils/tenshi/pkg-plist b/sysutils/tenshi/pkg-plist new file mode 100644 index 000000000000..c0b2e959001c --- /dev/null +++ b/sysutils/tenshi/pkg-plist @@ -0,0 +1,3 @@ +bin/tenshi +etc/rc.d/tenshi.sh +etc/tenshi.conf.sample |