Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2001 00:22:48 +0200 (CEST)
From:      Anders Nordby <anders@fix.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/29853: New port: www/mod_watch
Message-ID:  <20010818222248.A79EA3C83@totem.fix.no>

next in thread | raw e-mail | index | archive | help

>Number:         29853
>Category:       ports
>Synopsis:       New port: www/mod_watch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 18 15:30:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Anders Nordby
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Fluxpod Information eXchange
>Environment:

kern.osreldate: 430000 (4.3-STABLE)
kern.osreldate: 500018 (5.0-20010618-CURRENT)

>Description:

New port of mod_watch, an Apache module to monitor bandwidth usage. For use
with MRTG etc.

>How-To-Repeat:

	<Code/input/activities to reproduce the problem (multiple lines)>

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_watch
#	mod_watch/Makefile
#	mod_watch/distinfo
#	mod_watch/pkg-comment
#	mod_watch/pkg-descr
#	mod_watch/pkg-message
#	mod_watch/pkg-plist
#	mod_watch/pkg-install
#
echo c - mod_watch
mkdir -p mod_watch > /dev/null 2>&1
echo x - mod_watch/Makefile
sed 's/^X//' >mod_watch/Makefile << 'END-of-mod_watch/Makefile'
X# New ports collection makefile for:	mod_watch
X# Date created:			18 August 2001
X# Whom:				Anders Nordby <anders@fix.no>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mod_watch
XPORTVERSION=	2.1
XCATEGORIES=	www
XMASTER_SITES=	http://www.snert.com/Software/mod_watch/ \
X		ftp://ftp.nuug.no/pub/anders/distfiles/
XDISTNAME=	${PORTNAME}201
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	anders@fix.no
X
XBUILD_DEPENDS=	${APXS}:${PORTSDIR}/www/apache13
XRUN_DEPENDS=	${APXS}:${PORTSDIR}/www/apache13
X
XUSE_PERL5=	yes
X
XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
XAPXS?=		${LOCALBASE}/sbin/apxs
X
XDOCS=	apache2mrtg.html dbm-client.html dbm-server.html index.shtml \
X	mod_watch.html style.css
X
XFIXCONVERT=	CHANGES.TXT convert.pl index.shtml
X
Xpost-patch:
X.for f in ${FIXCONVERT}
X	@${SED} -e 's:convert.pl:convertdbm.pl:g' < ${WRKSRC}/${f} \
X		> ${WRKSRC}/${f}.tmp
X	@${MV} ${WRKSRC}/${f}.tmp ${WRKSRC}/${f}
X.endfor
X
Xdo-build:
X	@cd ${WRKSRC} && ${APXS} -c mod_watch.c
X
Xdo-install:
X	${APXS} -i -A -n watch ${WRKSRC}/mod_watch.so
X	${INSTALL_SCRIPT} ${WRKSRC}/apache2mrtg.pl ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/mod_watch.pl ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/convert.pl ${PREFIX}/sbin/convertdbm.pl
X	${INSTALL_SCRIPT} ${WRKSRC}/dbm-client.pl ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKSRC}/dbm-server.pl ${PREFIX}/sbin
X.if !defined(NOPORTDOCS)
X	@${INSTALL} -d -m 0755 ${PREFIX}/share/doc/mod_watch/html/Img
X	${INSTALL_DATA} ${WRKSRC}/CHANGES.TXT ${PREFIX}/share/doc/mod_watch/
X	${INSTALL_DATA} ${WRKSRC}/Img/mrpixel.gif ${PREFIX}/share/doc/mod_watch/html/Img/
X	${INSTALL_DATA} ${WRKSRC}/Img/sun-logo.jpg ${PREFIX}/share/doc/mod_watch/html/Img/
X	${INSTALL_DATA} ${WRKSRC}/Img/wave1.jpg ${PREFIX}/share/doc/mod_watch/html/Img/
X.for f in ${DOCS}
X	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/mod_watch/html/
X.endfor
X.endif
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-mod_watch/Makefile
echo x - mod_watch/distinfo
sed 's/^X//' >mod_watch/distinfo << 'END-of-mod_watch/distinfo'
XMD5 (mod_watch201.tgz) = 896177039e142c75cc8af6c1b4fb297e
END-of-mod_watch/distinfo
echo x - mod_watch/pkg-comment
sed 's/^X//' >mod_watch/pkg-comment << 'END-of-mod_watch/pkg-comment'
XAn Apache module to monitor bandwidth usage, for use with MRTG etc
END-of-mod_watch/pkg-comment
echo x - mod_watch/pkg-descr
sed 's/^X//' >mod_watch/pkg-descr << 'END-of-mod_watch/pkg-descr'
XThis Apache module will watch and collect the bytes in & out per virtual host,
Xper file owner, and the web server as a whole. It was designed for use with
XMRTG, which will make nice graphical representations of the data, but is
Xgeneral enough that it can be applied to other purposes.
X
XWWW: http://www.snert.com/Software/mod_watch/
X
X- Anders Nordby <anders@fix.no>
END-of-mod_watch/pkg-descr
echo x - mod_watch/pkg-message
sed 's/^X//' >mod_watch/pkg-message << 'END-of-mod_watch/pkg-message'
X************************************************************
XYou've installed mod_watch, a module to monitor bandwidth
Xusage.
X
X/var/spool/mod_watch has been created. It's owned by user 
Xnobody and group nobody. For mod_watch to work, the Apache
Xuser/group must be able to create and update files in this
Xdirectory.
X
XEdit your apache.conf or httpd.conf to enable and setup this
Xmodule. Have a look at the files in
X${PREFIX}/share/doc/mod_watch/html for information on how to
Xconfigure it etc.
X
XThen do this to make it work effective:
X
X# apachectl configtest (see if there are any config errors)
X# apachectl restart
X
X************************************************************
END-of-mod_watch/pkg-message
echo x - mod_watch/pkg-plist
sed 's/^X//' >mod_watch/pkg-plist << 'END-of-mod_watch/pkg-plist'
Xsbin/apache2mrtg.pl
Xsbin/mod_watch.pl
Xsbin/convertdbm.pl
Xsbin/dbm-client.pl
Xsbin/dbm-server.pl
Xlibexec/apache/mod_watch.so
X@exec %D/sbin/apxs -e -A -n watch %D/%F
X@unexec %D/sbin/apxs -e -A -n watch %D/%F
X%%PORTDOCS%%share/doc/mod_watch/html/Img/mrpixel.gif
X%%PORTDOCS%%share/doc/mod_watch/html/Img/sun-logo.jpg
X%%PORTDOCS%%share/doc/mod_watch/html/Img/wave1.jpg
X%%PORTDOCS%%share/doc/mod_watch/html/apache2mrtg.html
X%%PORTDOCS%%share/doc/mod_watch/html/dbm-client.html
X%%PORTDOCS%%share/doc/mod_watch/html/dbm-server.html
X%%PORTDOCS%%share/doc/mod_watch/html/index.shtml
X%%PORTDOCS%%share/doc/mod_watch/html/mod_watch.html
X%%PORTDOCS%%share/doc/mod_watch/html/style.css
X%%PORTDOCS%%share/doc/mod_watch/CHANGES.TXT
X%%PORTDOCS%%@dirrm share/doc/mod_watch/html/Img
X%%PORTDOCS%%@dirrm share/doc/mod_watch/html
X%%PORTDOCS%%@dirrm share/doc/mod_watch
END-of-mod_watch/pkg-plist
echo x - mod_watch/pkg-install
sed 's/^X//' >mod_watch/pkg-install << 'END-of-mod_watch/pkg-install'
X#!/bin/sh
X
Xcase $2 in
X    PRE-INSTALL)
X	;;
X    POST-INSTALL)
X	install -d -o nobody -g nobody -m 0755 /var/spool/mod_watch
X	;;
X    *)
X	echo "Unexpected Argument $2."
X	exit 1
X	;;
Xesac
Xexit 0
END-of-mod_watch/pkg-install
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010818222248.A79EA3C83>