wok-next diff squidguard/receipt @ rev 14706
python-edbus, python-edje, python-elementary, python-evas: back to 1.7.0
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 08 09:32:04 2013 +0200 (2013-06-08) |
parents | 940b5937e496 |
children | 1040bd60b471 |
line diff
1.1 --- a/squidguard/receipt Wed Mar 02 11:06:20 2011 +0100 1.2 +++ b/squidguard/receipt Sat Jun 08 09:32:04 2013 +0200 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 }