diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-05-12 10:48:47 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-05-12 10:48:47 -0300 |
commit | 52905437ad86d91ec0fa307f8322f6a5f265e505 (patch) | |
tree | 2053d0e96bf61fc1b307d1eb07bc4b9a68ff01e1 /community/privoxy | |
parent | 214c4f12ab4dfb21722a383924603c21698282c5 (diff) | |
parent | 8867b1d4d0601b21618d44d015460739590ca01d (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/abuse/PKGBUILD
extra/glibmm/PKGBUILD
Diffstat (limited to 'community/privoxy')
-rw-r--r-- | community/privoxy/PKGBUILD | 6 | ||||
-rwxr-xr-x | community/privoxy/privoxy | 20 |
2 files changed, 16 insertions, 10 deletions
diff --git a/community/privoxy/PKGBUILD b/community/privoxy/PKGBUILD index bc2ab246b..66c0a83cb 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 <archlinux at cryptocrack dot de> # Contributor: Juergen Hoetzel <juergen@hoetzel.info> # 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' 'mips64el') 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 |