FreeBSD Bugzilla – Attachment 92601 Details for
Bug 130273
[NEW PORT] www/squidstats: A collection of simple statistical analysis bits for Squid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
squidstats-54.shar
squidstats-54.shar (text/plain), 6.96 KB, created by
Adrian Chadd
on 2009-01-07 19:30:01 UTC
(
hide
)
Description:
squidstats-54.shar
Filename:
MIME Type:
Creator:
Adrian Chadd
Created:
2009-01-07 19:30:01 UTC
Size:
6.96 KB
patch
obsolete
># 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: ># ># squidstats ># squidstats/Makefile ># squidstats/pkg-descr ># squidstats/files ># squidstats/files/pkg-message.in ># squidstats/files/pkg-install.in ># squidstats/distinfo ># squidstats/pkg-plist ># >echo c - squidstats >mkdir -p squidstats > /dev/null 2>&1 >echo x - squidstats/Makefile >sed 's/^X//' >squidstats/Makefile << '2a560f3a72b96623862568b0834414b3' >X# Ports collection makefile for: squidstats >X# Whom: Adrian Chadd <adrian@FreeBSD.org> >X# Date Created: 10-December-2008 >X# >X# $FreeBSD$ >X# >X >XPORTNAME= squidstats >XPORTVERSION= 54 >XCATEGORIES= www >XMASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} >XDISTNAME= squidstats-r${PORTVERSION} >X >XMAINTAINER= adrian@FreeBSD.org >XCOMMENT= A collection of simple statistical analysis bits for Squid >X >XRUN_DEPENDS= p5-Config-IniFiles>=2.39:${PORTSDIR}/devel/p5-Config-IniFiles \ >X p5-RRD-Simple>=1.44:${PORTSDIR}/databases/p5-RRD-Simple \ >X p5-SNMP_Session>=1.11:${PORTSDIR}/net-mgmt/p5-SNMP_Session >X >XUSE_PERL5= yes >X >XSQUID_UID?= squid >XSQUID_GID?= squid >X >XSUB_FILES= pkg-message pkg-install >XSUB_LIST+= SQUID_UID=${SQUID_UID} SQUID_GID=${SQUID_GID} >X >Xpre-install: >X @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ >X ${PKGINSTALL} ${PKGNAME} PRE-INSTALL >X >Xpost-install: >X @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ >X ${PKGINSTALL} ${PKGNAME} POST-INSTALL >X @${ECHO_CMD} "===> post-installation information for ${PKGNAME}:" >X @${ECHO_CMD} "" >X @${CAT} ${PKGMESSAGE} >X @${ECHO_CMD} "" >X >X.include <bsd.port.mk> >2a560f3a72b96623862568b0834414b3 >echo x - squidstats/pkg-descr >sed 's/^X//' >squidstats/pkg-descr << 'cf2f61704f61f33a03303a63d60920e4' >XThis is a series of scripts for gathering and presenting statistical >Xinformation about a running Squid or Cacheboy application. >X >XWWW: http://code.google.com/p/squidstats/ >cf2f61704f61f33a03303a63d60920e4 >echo c - squidstats/files >mkdir -p squidstats/files > /dev/null 2>&1 >echo x - squidstats/files/pkg-message.in >sed 's/^X//' >squidstats/files/pkg-message.in << '4f478b2ca340f3c7ecf7db23e482df39' >X >XTo setup the database, run the following command as the statistics >Xuser (generally "squid") : >X >X# su -m squid -c "%%PREFIX%%/bin/squidstats.pl createdb" >X >XThen, add a configuration section to squid.conf to allow SNMP from >Xlocalhost: >X >X# snmp config >Xacl snmp_host src 127.0.0.1 >Xacl all src 0.0.0.0/0 >Xsnmp_port 3401 >Xacl snmppublic snmp_community public >Xsnmp_access allow snmppublic snmp_host >Xsnmp_access deny all >X >XThen make sure the following line is added to the squid crontab: >X*/5 * * * * %%PREFIX%%/bin/squidstats.pl gather 2>/dev/null >X >XNext, the supplied graph.css file will need to be copied or >Xsymlinked from %%PREFIX%%/share/squidstats/htdocs/graph.css >Xto wherever your webserver root is. >X >XFinally, you will need to ensure that the graph directory and >Xcgi-bin script are in the right place. By default, the cgi script >Xis installed in %%PREFIX%%/www/cgi-bin/ and the graph directory >Xis in /var/db/squidstats/graphs; you will need to copy the graph >Xscript into the correct place and symlink the graph directory >Xinto your webserver root directory. >X >XFor example, this will symlink the graph directory into the >Xapache 1.x web root: >X >X# ln -s /var/db/squidstats/graphs /usr/local/www/data/ >4f478b2ca340f3c7ecf7db23e482df39 >echo x - squidstats/files/pkg-install.in >sed 's/^X//' >squidstats/files/pkg-install.in << 'c9571e5f0372d2f005af545fe3c5f62c' >X#!/bin/sh >X# >X# $FreeBSD: ports/www/squid/files/pkg-install.in,v 1.3 2007/02/07 08:42:29 pav Exp $ >X# >X >XPATH=/bin:/usr/bin:/usr/sbin >Xpkgname=$1 >Xsquid_base="${PKG_PREFIX:-%%PREFIX%%}/squid" >Xsquid_confdir="${PKG_PREFIX:-%%PREFIX%%}/etc/squid" >Xif [ -x /usr/sbin/nologin ]; then >X nologin=/usr/sbin/nologin >Xelse >X nologin=/sbin/nologin >Xfi >X >Xsquid_user="%%SQUID_UID%%" >Xsquid_group="%%SQUID_GID%%" >Xsquid_name="Squid caching-proxy pseudo-owner" >Xsquid_homedir="/usr/local/squid" >Xsquid_gid=100 >Xsquid_uid=100 >X >X >Xgroup_create () { >X n_group=$1 >X n_gid=$2 >X if ! pw groupshow ${n_group} -q >/dev/null ; then >X echo "There is no group '${n_group}' on this system, so I will try to create it (using group id ${n_gid}):" >X if ! pw groupadd ${n_group} -g ${n_gid} -q ; then >X echo "Failed to create group \"${n_group}\"!" >&2 >X echo "Please create it manually." >&2 >X exit 1 >X else >X echo "Group '${n_group}' created successfully:" >X fi >X else >X echo "I will use the existing group '${n_group}':" >X fi >X pw groupshow ${n_group} >X} >X >Xuser_create () { >X n_user="$1" >X n_uid="$2" >X n_group="$3" >X n_homedir="$4" >X n_name="$5" >X n_shell="$6" >X >X echo "Given: $1 $2 $3 $4 '$5' '$6'" >X >X if ! pw usershow ${n_user} -q >/dev/null ; then >X echo "There is no account '${n_user}' on this system, so I will try to create it (using user id ${n_uid}):" >X if ! pw useradd -q -n ${n_user} \ >X -u ${n_uid} -g ${n_group} \ >X -c "${n_name}" \ >X -d "${n_homedir}" -s "${n_shell}" \ >X -h - ; then >X echo "Failed to create user '${n_user}'!" >&2 >X echo "Please create it manually." >&2 >X exit 1 >X else >X echo "User '${n_user}' created successfully:" >X fi >X else >X echo "I will use the existing user '${n_user}':" >X fi >X pw usershow ${n_user} >X} >X >Xcase $2 in >XPRE-INSTALL) >X echo "===> Pre-installation configuration for ${pkgname}" >X echo "===> - Creating Groups" >X group_create ${squid_group} ${squid_gid} >X echo "===> - Creating Users" >X user_create ${squid_user} ${squid_uid} ${squid_group} ${squid_homedir} "${squid_name}" ${nologin} >X echo "===> - Done." >X ;; >XPOST-INSTALL) >X ;; >X*) >X exit 64 >X ;; >Xesac >Xexit 0 >c9571e5f0372d2f005af545fe3c5f62c >echo x - squidstats/distinfo >sed 's/^X//' >squidstats/distinfo << '1c02dd9930b704399116cfde07342558' >XMD5 (squidstats-r54.tar.gz) = 0747361f28bb883424f340288146f77f >XSHA256 (squidstats-r54.tar.gz) = 9dbdcafebddbb3b62abca398da351894967cbf2e758a9c4df3df45ea82ba99c0 >XSIZE (squidstats-r54.tar.gz) = 9504 >1c02dd9930b704399116cfde07342558 >echo x - squidstats/pkg-plist >sed 's/^X//' >squidstats/pkg-plist << 'd374ed927ea61f83d8df6744a882e573' >Xetc/squidstats/config.ini >Xetc/squidstats/snmp_monitor.cfg >Xetc/squidstats/templates.conf >Xshare/squidstats/templates/clients >Xshare/squidstats/templates/dnsreq >Xshare/squidstats/templates/fds >Xshare/squidstats/templates/hitratio >Xshare/squidstats/templates/icp >Xshare/squidstats/templates/ipcachereq >Xshare/squidstats/templates/outgoing >Xshare/squidstats/templates/cache >Xshare/squidstats/templates/cpu >Xshare/squidstats/templates/dnssvc >Xshare/squidstats/templates/fqdncachereq >Xshare/squidstats/templates/httpsvc >Xshare/squidstats/templates/incoming >Xshare/squidstats/templates/objects >Xshare/squidstats/templates/requests >Xshare/squidstats/htdocs/graph.css >Xbin/squidstats.pl >Xwww/cgi-bin/graph-summary.cgi >X@dirrmtry www/cgi-bin >X@dirrm etc/squidstats >X@dirrm share/squidstats/htdocs >X@dirrm share/squidstats/templates >X@dirrm share/squidstats >d374ed927ea61f83d8df6744a882e573 >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 130273
: 92601