From 8867b1d4d0601b21618d44d015460739590ca01d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 May 2011 22:34:26 +0000 Subject: Wed May 11 22:34:25 UTC 2011 --- community/privoxy/PKGBUILD | 6 +++--- community/privoxy/privoxy | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'community/privoxy') diff --git a/community/privoxy/PKGBUILD b/community/privoxy/PKGBUILD index 7e86f05be..e133f8029 100644 --- a/community/privoxy/PKGBUILD +++ b/community/privoxy/PKGBUILD @@ -1,11 +1,11 @@ -# $Id$ +# $Id: PKGBUILD 46699 2011-05-10 18:48:15Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: Juergen Hoetzel # Contributor: basilburn (basilburn), Paul Bredbury (brebs) pkgname=privoxy pkgver=3.0.17 -pkgrel=1 +pkgrel=2 pkgdesc='A web proxy with advanced filtering capabilities.' arch=('i686' 'x86_64') url='http://www.privoxy.org' @@ -22,7 +22,7 @@ source=("http://downloads.sourceforge.net/ijbswa/${pkgname}-${pkgver}-stable-src 'privoxy.logrotate.d' 'privoxy.conf.d') md5sums=('9d363d738a3f3d73e774d6dfeafdb15f' - 'a799e4d4f0ebb7f08190fa2bc961f439' + '1b4ed8c4e7e5b04b10ef41b597dc3f3b' 'a364c34c8dc6eb78c9a6b777237932de' '27830ef79418e277b90c1c1fa933f876') diff --git a/community/privoxy/privoxy b/community/privoxy/privoxy index eb85bd5f9..754453de5 100755 --- a/community/privoxy/privoxy +++ b/community/privoxy/privoxy @@ -6,17 +6,23 @@ # source application-specific settings [ -f /etc/conf.d/privoxy ] && . /etc/conf.d/privoxy +# read logdir and logfile from privoxy config +prld=`grep ^logdir "$PRIVOXY_CONF" 2>/dev/null | cut -d' ' -f2` +[ -n "$prld" ] || prld=/var/log/privoxy +prlf=`grep ^logfile "$PRIVOXY_CONF" 2>/dev/null | cut -d' ' -f2` +[ -n "$prlf" ] || prlf=logfile + PID=`pidof -o %PPID /usr/sbin/privoxy` case "$1" in start) stat_busy "Starting Privoxy" - # create missing logfiles - for f in logfile jarfile; do - touch "/var/log/privoxy/${f}" - chgrp "${PRIVOXY_GROUP}" "/var/log/privoxy/${f}" - chmod 0660 "/var/log/privoxy/${f}" - done + # create missing logdir and logfile + [ -d "$prld" ] || mkdir -p "$prld" + if [ ! -f "$prlf" ]; then + touch "$prld/$prlf" && chgrp "${PRIVOXY_GROUP}" "$prld/$prlf" && \ + chmod 0660 "$prld/$prlf" + fi [ -z "$PID" ] && /usr/sbin/privoxy --user ${PRIVOXY_USER}.${PRIVOXY_GROUP} \ ${PRIVOXY_ARGS} ${PRIVOXY_CONF} if [ $? -gt 0 ]; then @@ -42,6 +48,6 @@ case "$1" in $0 start ;; *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|stop|restart}" esac exit 0 -- cgit v1.2.3-54-g00ecf