diff options
author | clement <clement@FreeBSD.org> | 2004-01-09 21:28:50 +0800 |
---|---|---|
committer | clement <clement@FreeBSD.org> | 2004-01-09 21:28:50 +0800 |
commit | 725834734acaae5be213c4bbfa7546f610505b9b (patch) | |
tree | 6ecbb676f8fe3ba1a247133836786020581f497b /www/mod_watch4 | |
parent | 0a0504571b917bb115be233848589ad26442560b (diff) | |
download | freebsd-ports-gnome-725834734acaae5be213c4bbfa7546f610505b9b.tar.gz freebsd-ports-gnome-725834734acaae5be213c4bbfa7546f610505b9b.tar.zst freebsd-ports-gnome-725834734acaae5be213c4bbfa7546f610505b9b.zip |
Add mod_watch4 4.3, an Apache2 module to monitor bandwidth usage, for
use with MRTG etc.
PR: 57865
Submitted by: Toshiya SAITOH <toshiya@saitoh.nu>
Approved by: erwin (mentor) (implicitly)
Diffstat (limited to 'www/mod_watch4')
-rw-r--r-- | www/mod_watch4/Makefile | 58 | ||||
-rw-r--r-- | www/mod_watch4/distinfo | 1 | ||||
-rw-r--r-- | www/mod_watch4/pkg-descr | 8 | ||||
-rw-r--r-- | www/mod_watch4/pkg-install | 14 | ||||
-rw-r--r-- | www/mod_watch4/pkg-message | 20 | ||||
-rw-r--r-- | www/mod_watch4/pkg-plist | 21 |
6 files changed, 122 insertions, 0 deletions
diff --git a/www/mod_watch4/Makefile b/www/mod_watch4/Makefile new file mode 100644 index 000000000000..08f710e33211 --- /dev/null +++ b/www/mod_watch4/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: mod_watch4 +# Date created: 11 Octber 2003 +# Whom: Toshiya SAITOH <toshiya@saitoh.nu> +# +# $FreeBSD$ +# + +PORTNAME= mod_watch +PORTVERSION= 4.3 +CATEGORIES= www +MASTER_SITES= http://www.snert.com/Software/download/ +DISTNAME= ${PORTNAME}${PORTVERSION:S/./0/g} +EXTRACT_SUFX= .tgz +DIST_SUBDIR= apache2 + +MAINTAINER= toshiya@saitoh.nu +COMMENT= An Apache2 module to monitor bandwidth usage, for use with MRTG etc + +RUN_DEPENDS= mrtg:${PORTSDIR}/net/mrtg + +NO_PACKAGE= "Binary package distribution is prohibited by license" +NO_CDROM= "Commercial distfile distribution is prohibited by license" + +USE_PERL5_RUN= yes +USE_APACHE= yes +WITH_APACHE2= yes + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +MAKEFILE= Makefile.dso + +MAKE_ARGS+= APXS="${APXS}" + +ALL_TARGET= build + +DOCS= apache2mrtg.shtml index.shtml mailto.js mod_watch.shtml style.css +DOCS_HTMLIMAGES= apache-header-476-62.png mrpixel.gif mrtg-bar.png \ + sun-logo.jpg wave1.jpg + +do-install: + ${APXS} -i -a -n watch ${WRKSRC}/mod_watch.la + ${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/nfields.pl ${PREFIX}/sbin +.if !defined(NOPORTDOCS) + @${INSTALL} -d -m 0755 ${DOCSDIR}/html/Img + ${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/LICENSE.TXT ${DOCSDIR}/ +.for f in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/html/ +.endfor +.for f in ${DOCS_HTMLIMAGES} + ${INSTALL_DATA} ${WRKSRC}/Img/${f} ${DOCSDIR}/html/Img/ +.endfor +.endif + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/www/mod_watch4/distinfo b/www/mod_watch4/distinfo new file mode 100644 index 000000000000..16687bcf261c --- /dev/null +++ b/www/mod_watch4/distinfo @@ -0,0 +1 @@ +MD5 (apache2/mod_watch403.tgz) = 06d57713adb935f16596d22256bca913 diff --git a/www/mod_watch4/pkg-descr b/www/mod_watch4/pkg-descr new file mode 100644 index 000000000000..0d516920b8a7 --- /dev/null +++ b/www/mod_watch4/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/ + +- Toshiya Saitoh <toshiya@saitoh.nu> diff --git a/www/mod_watch4/pkg-install b/www/mod_watch4/pkg-install new file mode 100644 index 000000000000..97ac46175592 --- /dev/null +++ b/www/mod_watch4/pkg-install @@ -0,0 +1,14 @@ +#!/bin/sh + +case $2 in + PRE-INSTALL) + ;; + POST-INSTALL) + install -d -o www -g www -m 0755 /var/spool/mod_watch + ;; + *) + echo "Unexpected Argument $2." + exit 1 + ;; +esac +exit 0 diff --git a/www/mod_watch4/pkg-message b/www/mod_watch4/pkg-message new file mode 100644 index 000000000000..e24a59f37b94 --- /dev/null +++ b/www/mod_watch4/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 +www and group www. 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_watch4/pkg-plist b/www/mod_watch4/pkg-plist new file mode 100644 index 000000000000..6ee5da0f0cf7 --- /dev/null +++ b/www/mod_watch4/pkg-plist @@ -0,0 +1,21 @@ +sbin/apache2mrtg.pl +sbin/mod_watch.pl +sbin/nfields.pl +libexec/apache2/mod_watch.so +@exec %D/sbin/apxs -e -A -n watch %D/%F +@unexec %D/sbin/apxs -e -A -n watch %D/%F +%%PORTDOCS%%%%DOCSDIR%%/html/Img/apache-header-476-62.png +%%PORTDOCS%%%%DOCSDIR%%/html/Img/mrpixel.gif +%%PORTDOCS%%%%DOCSDIR%%/html/Img/mrtg-bar.png +%%PORTDOCS%%%%DOCSDIR%%/html/Img/sun-logo.jpg +%%PORTDOCS%%%%DOCSDIR%%/html/Img/wave1.jpg +%%PORTDOCS%%%%DOCSDIR%%/html/apache2mrtg.shtml +%%PORTDOCS%%%%DOCSDIR%%/html/index.shtml +%%PORTDOCS%%%%DOCSDIR%%/html/mailto.js +%%PORTDOCS%%%%DOCSDIR%%/html/mod_watch.shtml +%%PORTDOCS%%%%DOCSDIR%%/html/style.css +%%PORTDOCS%%%%DOCSDIR%%/CHANGES.TXT +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.TXT +%%PORTDOCS%%@dirrm %%DOCSDIR%%/html/Img +%%PORTDOCS%%@dirrm %%DOCSDIR%%/html +%%PORTDOCS%%@dirrm %%DOCSDIR%% |