diff options
author | knu <knu@FreeBSD.org> | 2001-09-04 02:27:28 +0800 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2001-09-04 02:27:28 +0800 |
commit | b7dd17393aabd8fe4a6d8dc891c8fb6e20c858d8 (patch) | |
tree | 4c0a820da4b778be2b9a70dd73df32bafc7b3756 /www/mod_watch | |
parent | d41146532e6187d4592f7cdbcde3feebd56bd1d8 (diff) | |
download | freebsd-ports-gnome-b7dd17393aabd8fe4a6d8dc891c8fb6e20c858d8.tar.gz freebsd-ports-gnome-b7dd17393aabd8fe4a6d8dc891c8fb6e20c858d8.tar.zst freebsd-ports-gnome-b7dd17393aabd8fe4a6d8dc891c8fb6e20c858d8.zip |
Add mod_watch, an Apache module to monitor bandwidth usage. For use
with MRTG etc.
PR: ports/29853
Submitted by: Anders Nordby <anders@fix.no>
Diffstat (limited to 'www/mod_watch')
-rw-r--r-- | www/mod_watch/Makefile | 62 | ||||
-rw-r--r-- | www/mod_watch/distinfo | 1 | ||||
-rw-r--r-- | www/mod_watch/pkg-comment | 1 | ||||
-rw-r--r-- | www/mod_watch/pkg-descr | 8 | ||||
-rw-r--r-- | www/mod_watch/pkg-install | 14 | ||||
-rw-r--r-- | www/mod_watch/pkg-message | 20 | ||||
-rw-r--r-- | www/mod_watch/pkg-plist | 21 |
7 files changed, 127 insertions, 0 deletions
diff --git a/www/mod_watch/Makefile b/www/mod_watch/Makefile new file mode 100644 index 000000000000..5697a9e7c37e --- /dev/null +++ b/www/mod_watch/Makefile @@ -0,0 +1,62 @@ +# New ports collection makefile for: mod_watch +# Date created: 18 August 2001 +# Whom: Anders Nordby <anders@fix.no> +# +# $FreeBSD$ +# + +PORTNAME= mod_watch +PORTVERSION= 2.1 +CATEGORIES= www +MASTER_SITES= http://www.snert.com/Software/mod_watch/ \ + ftp://ftp.nuug.no/pub/anders/distfiles/ +DISTNAME= ${PORTNAME}201 +EXTRACT_SUFX= .tgz + +MAINTAINER= anders@fix.no + +BUILD_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 +RUN_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13 + +USE_PERL5= yes + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +APXS?= ${LOCALBASE}/sbin/apxs + +DOCS= apache2mrtg.html dbm-client.html dbm-server.html index.shtml \ + mod_watch.html style.css + +FIXCONVERT= CHANGES.TXT convert.pl index.shtml + +post-patch: +.for f in ${FIXCONVERT} + @${SED} -e 's:convert.pl:convertdbm.pl:g' < ${WRKSRC}/${f} \ + > ${WRKSRC}/${f}.tmp + @${MV} ${WRKSRC}/${f}.tmp ${WRKSRC}/${f} +.endfor + +do-build: + @cd ${WRKSRC} && ${APXS} -c mod_watch.c + +do-install: + ${APXS} -i -A -n watch ${WRKSRC}/mod_watch.so + ${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/convert.pl ${PREFIX}/sbin/convertdbm.pl + ${INSTALL_SCRIPT} ${WRKSRC}/dbm-client.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/dbm-server.pl ${PREFIX}/sbin +.if !defined(NOPORTDOCS) + @${INSTALL} -d -m 0755 ${PREFIX}/share/doc/mod_watch/html/Img + ${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${PREFIX}/share/doc/mod_watch/ + ${INSTALL_DATA} ${WRKSRC}/Img/mrpixel.gif ${PREFIX}/share/doc/mod_watch/html/Img/ + ${INSTALL_DATA} ${WRKSRC}/Img/sun-logo.jpg ${PREFIX}/share/doc/mod_watch/html/Img/ + ${INSTALL_DATA} ${WRKSRC}/Img/wave1.jpg ${PREFIX}/share/doc/mod_watch/html/Img/ +.for f in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/mod_watch/html/ +.endfor +.endif + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/www/mod_watch/distinfo b/www/mod_watch/distinfo new file mode 100644 index 000000000000..c030a24684d5 --- /dev/null +++ b/www/mod_watch/distinfo @@ -0,0 +1 @@ +MD5 (mod_watch201.tgz) = 896177039e142c75cc8af6c1b4fb297e diff --git a/www/mod_watch/pkg-comment b/www/mod_watch/pkg-comment new file mode 100644 index 000000000000..ce05d907549c --- /dev/null +++ b/www/mod_watch/pkg-comment @@ -0,0 +1 @@ +An Apache module to monitor bandwidth usage, for use with MRTG etc diff --git a/www/mod_watch/pkg-descr b/www/mod_watch/pkg-descr new file mode 100644 index 000000000000..81e1f0360031 --- /dev/null +++ b/www/mod_watch/pkg-descr @@ -0,0 +1,8 @@ +This Apache module will watch and collect the bytes in & out per virtual host, +per file owner, and the web server as a whole. It was designed for use with +MRTG, which will make nice graphical representations of the data, but is +general enough that it can be applied to other purposes. + +WWW: http://www.snert.com/Software/mod_watch/ + +- Anders Nordby <anders@fix.no> diff --git a/www/mod_watch/pkg-install b/www/mod_watch/pkg-install new file mode 100644 index 000000000000..0c7f66126020 --- /dev/null +++ b/www/mod_watch/pkg-install @@ -0,0 +1,14 @@ +#!/bin/sh + +case $2 in + PRE-INSTALL) + ;; + POST-INSTALL) + install -d -o nobody -g nobody -m 0755 /var/spool/mod_watch + ;; + *) + echo "Unexpected Argument $2." + exit 1 + ;; +esac +exit 0 diff --git a/www/mod_watch/pkg-message b/www/mod_watch/pkg-message new file mode 100644 index 000000000000..349b0b88f4d3 --- /dev/null +++ b/www/mod_watch/pkg-message @@ -0,0 +1,20 @@ +************************************************************ +You've installed mod_watch, a module to monitor bandwidth +usage. + +/var/spool/mod_watch has been created. It's owned by user +nobody and group nobody. For mod_watch to work, the Apache +user/group must be able to create and update files in this +directory. + +Edit your apache.conf or httpd.conf to enable and setup this +module. Have a look at the files in +${PREFIX}/share/doc/mod_watch/html for information on how to +configure it etc. + +Then do this to make it work effective: + +# apachectl configtest (see if there are any config errors) +# apachectl restart + +************************************************************ diff --git a/www/mod_watch/pkg-plist b/www/mod_watch/pkg-plist new file mode 100644 index 000000000000..9be3736f95f1 --- /dev/null +++ b/www/mod_watch/pkg-plist @@ -0,0 +1,21 @@ +sbin/apache2mrtg.pl +sbin/mod_watch.pl +sbin/convertdbm.pl +sbin/dbm-client.pl +sbin/dbm-server.pl +libexec/apache/mod_watch.so +@exec %D/sbin/apxs -e -A -n watch %D/%F +@unexec %D/sbin/apxs -e -A -n watch %D/%F +%%PORTDOCS%%share/doc/mod_watch/html/Img/mrpixel.gif +%%PORTDOCS%%share/doc/mod_watch/html/Img/sun-logo.jpg +%%PORTDOCS%%share/doc/mod_watch/html/Img/wave1.jpg +%%PORTDOCS%%share/doc/mod_watch/html/apache2mrtg.html +%%PORTDOCS%%share/doc/mod_watch/html/dbm-client.html +%%PORTDOCS%%share/doc/mod_watch/html/dbm-server.html +%%PORTDOCS%%share/doc/mod_watch/html/index.shtml +%%PORTDOCS%%share/doc/mod_watch/html/mod_watch.html +%%PORTDOCS%%share/doc/mod_watch/html/style.css +%%PORTDOCS%%share/doc/mod_watch/CHANGES.TXT +%%PORTDOCS%%@dirrm share/doc/mod_watch/html/Img +%%PORTDOCS%%@dirrm share/doc/mod_watch/html +%%PORTDOCS%%@dirrm share/doc/mod_watch |