source: npl/internetserver/squid/post.squid @ 7b3e813

gcc484perl-5.22
Last change on this file since 7b3e813 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.0 KB
Line 
1#!/bin/bash -x
2svcstop /service/squid || exit 1
3
4#standaard instellingen omzetten naar nieuwe systeem als dit eventueel moet.
5#needs conversion to new configfile. if this is found, always old configfile is present!
6
7#oude cache zooi opschonen, wordt ook niet meer aangemaakt
8if [ -f /var/log/squid/cache.log ]; then
9    rm /var/log/squid/cache*;
10fi
11if [ -f /var/log/squid/store.log ]; then
12    rm /var/log/squid/store*
13fi
14
15#'Multiple filterlist per regel systeem' converter.
16sed -i /home/system/proxy/squid.conf \
17                        -e "s/acl manager proto cache_object/acl syn3ReqPro_Management_protocol proto \"\/home\/system\/proxy\/filterlists\/ReqPro_Management_protocol\"/1" \
18                        -e "s/acl CONNECT method CONNECT/acl syn3ReqHead_CONNECT method \"\/home\/system\/proxy\/filterlists\/ReqHead_CONNECT\"/1" \
19                        -e "s/http_access deny manager/http_access deny syn3ReqPro_Management_protocol/1" \
20                        -e "s/http_access deny CONNECT \!syn3PortList_SSL_Ports/http_access deny \!syn3PortList_SSL_Ports syn3ReqHead_CONNECT/1"
21
22if ! (( `grep "auth_param ntlm" /home/system/proxy/squid.conf | wc -l` > 0 )); then
23        sed -i /home/system/proxy/squid.conf \
24        -e 's/#  TAG: auth_param/#  TAG: auth_param\n#auth_param ntlm program \/usr\/bin\/ntlm_auth --helper-protocol=squid-2.5-ntlmssp\n#auth_param ntlm children 5/'
25fi
26
27
28if ! (( `grep "external_acl_type wbinfo_group" /home/system/proxy/squid.conf  | wc -l`  > 0 )); then
29        sed -i /home/system/proxy/squid.conf \
30        -e 's/external_acl_type ldap_group ttl=300 %LOGIN \/usr\/bin\/squid_ldap_group -b "ou=Groups,dc=syn-3" -h ldap-master -f "(\&(memberuid=%v)(cn=%a))"/external_acl_type ldap_group ttl=300 %LOGIN \/usr\/bin\/squid_ldap_group -b "ou=Groups,dc=syn-3" -h ldap-master -f "(\&(memberuid=%v)(cn=%a))" \nexternal_acl_type wbinfo_group %LOGIN \/usr\/bin\/wbinfo_group.pl/'
31fi
32
33#Needed for x-forward-for headers:
34if ! grep follow_x_forwarded_for /home/system/proxy/squid.conf; then
35        echo follow_x_forwarded_for allow syn3SourceList_localhost >> /home/system/proxy/squid.conf
36fi
37
38squid -z || exit 1
39svcreset /service/squid || exit 1
Note: See TracBrowser for help on using the repository browser.