wok-stable diff squidguard/receipt @ rev 12307

sane-backends: update wget_url,bdeps,add patchs
author Richard Dunbar <mojo@slitaz.org>
date Mon Jul 02 10:27:36 2012 +0000 (2012-07-02)
parents 940b5937e496
children
line diff
     1.1 --- a/squidguard/receipt	Wed Mar 02 11:06:20 2011 +0100
     1.2 +++ b/squidguard/receipt	Mon Jul 02 10:27:36 2012 +0000
     1.3 @@ -46,30 +46,26 @@
     1.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     1.5  genpkg_rules()
     1.6  {
     1.7 -	cp -a $_pkg/* $fs/
     1.8 +	mkdir -p $fs/etc/squid/conf.d
     1.9 +	
    1.10 +	cp -a $install/* $fs/
    1.11 +	cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d
    1.12 +	
    1.13 +	# Cleanup.
    1.14  	rmdir $fs/usr/squidGuard
    1.15 +	
    1.16  }
    1.17  
    1.18  # Pre and post install commands for Tazpkg.
    1.19  post_install()
    1.20  {
    1.21  	chown -R nobody $1/var/lib/squidGuard/*
    1.22 -	if ! grep -q ^redirect_program $1/etc/squid/squid.conf ; then
    1.23 -		echo "Updating /etc/squid/squid.conf"
    1.24 -		cat >> $1/etc/squid/squid.conf <<EOF
    1.25 -redirect_program /usr/bin/squidGuard -c /etc/squidGuard/squidGuard.conf
    1.26 -EOF
    1.27 -		# Restart squid if running
    1.28 -		$(which squid) -k reconfigure 2> /dev/null
    1.29 -	fi
    1.30 +	# Recharge squid config
    1.31 +	[ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
    1.32  }
    1.33  
    1.34  post_remove()
    1.35  {
    1.36 -	if grep -q "squidGuard" 	/etc/squid/squid.conf ; then
    1.37 -		echo "Updating /etc/squid/squid.conf"
    1.38 -		sed -i -e "s/.*squidGuard.*//" /etc/squid/squid.conf
    1.39 -		# Restart squid if running
    1.40 -		$(which squid) -k reconfigure 2> /dev/null
    1.41 -	fi
    1.42 +	# Recharge squid config
    1.43 +	[ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
    1.44  }