wok rev 12148

squidclamav: Fix config. Remove unwanted file
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Mar 15 00:08:22 2012 +0100 (2012-03-15)
parents 1048bdb56768
children 7f0d30db2f42
files squidclamav/receipt squidclamav/stuff/icap-clamav.conf
line diff
     1.1 --- a/squidclamav/receipt	Wed Mar 14 13:14:54 2012 +0100
     1.2 +++ b/squidclamav/receipt	Thu Mar 15 00:08:22 2012 +0100
     1.3 @@ -42,12 +42,16 @@
     1.4  	sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
     1.5  		-e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
     1.6  		$fs/etc/squidclamav.conf
     1.7 +		
     1.8 +	rm -f $fs/usr/lib/c_icap/*.la		
     1.9 +
    1.10  
    1.11  }
    1.12  
    1.13  #Post install command
    1.14  post_install()
    1.15  {
    1.16 +	echo 'Service squidclamav squidclamav.so' >> $1/etc/c-icap/c-icap.conf
    1.17  	if ( ps | grep -q squid ); then
    1.18  		/etc/init.d/squid restart
    1.19  	fi
    1.20 @@ -56,7 +60,11 @@
    1.21  #Post remove command
    1.22  post_remove()
    1.23  {
    1.24 +	sed -i -e "s/.*squidclamav.*//" $1/etc/c-icap/c-icap.conf"
    1.25  	if ( ps | grep -q squid ); then
    1.26  		/etc/init.d/squid restart
    1.27  	fi
    1.28 +	if ( ps | grep -q c-icap ); then
    1.29 +		/etc/init.d/c-icapd restart
    1.30 +	fi
    1.31  }
     2.1 --- a/squidclamav/stuff/icap-clamav.conf	Wed Mar 14 13:14:54 2012 +0100
     2.2 +++ b/squidclamav/stuff/icap-clamav.conf	Thu Mar 15 00:08:22 2012 +0100
     2.3 @@ -8,6 +8,8 @@
     2.4  icap_preview_enable on
     2.5  icap_preview_size 1024
     2.6  icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
     2.7 +icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
     2.8 +adaptation_service_set class_avreq service_req
     2.9 +adaptation_service_set class_avresp service_req
    2.10  adaptation_access service_req allow all
    2.11 -icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
    2.12  adaptation_access service_resp allow all