mirror of
https://github.com/YunoHost-Apps/squid3_ynh.git
synced 2024-09-03 20:26:11 +02:00
Check correct squid folder in /etc
This commit is contained in:
parent
7d561eaeb8
commit
891a8f675a
3 changed files with 13 additions and 12 deletions
|
@ -21,7 +21,7 @@ acl purge method PURGE
|
||||||
acl CONNECT method CONNECT
|
acl CONNECT method CONNECT
|
||||||
|
|
||||||
###Directive pour n’autoriser que les comptes enregistrés dans le LDAP de Yunohost
|
###Directive pour n’autoriser que les comptes enregistrés dans le LDAP de Yunohost
|
||||||
auth_param basic program /usr/lib/squid3/basic_ldap_auth -b dc=yunohost,dc=org -h 127.0.0.1 -f "uid=%s"
|
auth_param basic program /usr/lib/__SQUID__/basic_ldap_auth -b dc=yunohost,dc=org -h 127.0.0.1 -f "uid=%s"
|
||||||
|
|
||||||
auth_param basic children 50
|
auth_param basic children 50
|
||||||
auth_param basic realm Web-Proxy
|
auth_param basic realm Web-Proxy
|
||||||
|
@ -44,9 +44,9 @@ dns_nameservers 127.0.0.1
|
||||||
##Port d'écoute du Proxy
|
##Port d'écoute du Proxy
|
||||||
http_port __PORT__
|
http_port __PORT__
|
||||||
forwarded_for off ### mode transparant, la vrai IP est cachée
|
forwarded_for off ### mode transparant, la vrai IP est cachée
|
||||||
cache_dir aufs /var/spool/squid3 10000 16 256
|
cache_dir aufs /var/spool/__SQUID__ 10000 16 256
|
||||||
hierarchy_stoplist cgi-bin ?
|
hierarchy_stoplist cgi-bin ?
|
||||||
access_log /var/log/squid3/access.log squid
|
access_log /var/log/__SQUID__/access.log squid
|
||||||
refresh_pattern ^ftp: 1440 20% 10080
|
refresh_pattern ^ftp: 1440 20% 10080
|
||||||
refresh_pattern ^gopher: 1440 0% 1440
|
refresh_pattern ^gopher: 1440 0% 1440
|
||||||
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
|
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
|
||||||
|
|
|
@ -66,19 +66,19 @@ ynh_install_app_dependencies squid3 mailutils
|
||||||
# See is squid3 folder is there
|
# See is squid3 folder is there
|
||||||
if [ -d "/etc/squid3" ]; then
|
if [ -d "/etc/squid3" ]; then
|
||||||
squid="squid3"
|
squid="squid3"
|
||||||
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
|
||||||
cp -f "../conf/squid.conf" "/etc/squid3/."
|
|
||||||
# If squid3 folder is not found look for squid folder
|
# If squid3 folder is not found look for squid folder
|
||||||
elif [ -d "/etc/squid" ]; then
|
elif [ -d "/etc/squid" ]; then
|
||||||
squid="squid"
|
squid="squid"
|
||||||
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
|
||||||
cp -f "../conf/squid.conf" "/etc/squid/."
|
|
||||||
# If both folders are not found then call ynh_die
|
# If both folders are not found then call ynh_die
|
||||||
else
|
else
|
||||||
ynh_die "No squid folder found in /etc. Looks like squid 3 package is not installed. Try installing it manually by apt-get install squid3"
|
ynh_die "No squid folder found in /etc. Looks like squid 3 package is not installed. Try installing it manually by apt-get install squid3"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
||||||
|
ynh_replace_string "__SQUID__" "$squid" "../conf/squid.conf"
|
||||||
|
cp -f "../conf/squid.conf" "/etc/$squid/."
|
||||||
# Save squid folder
|
# Save squid folder
|
||||||
ynh_app_setting_set $app squid_folder $squid
|
ynh_app_setting_set $app squid_folder $squid
|
||||||
|
|
||||||
|
|
|
@ -57,19 +57,20 @@ yunohost firewall allow --no-upnp TCP $port
|
||||||
# See is squid3 folder is there
|
# See is squid3 folder is there
|
||||||
if [ -d "/etc/squid3" ]; then
|
if [ -d "/etc/squid3" ]; then
|
||||||
squid="squid3"
|
squid="squid3"
|
||||||
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
|
||||||
cp -f "../conf/squid.conf" "/etc/squid3/."
|
|
||||||
# If squid3 folder is not found look for squid folder
|
# If squid3 folder is not found look for squid folder
|
||||||
elif [ -d "/etc/squid" ]; then
|
elif [ -d "/etc/squid" ]; then
|
||||||
squid="squid"
|
squid="squid"
|
||||||
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
|
||||||
cp -f "../conf/squid.conf" "/etc/squid/."
|
|
||||||
# If both folders are not found then call ynh_die
|
# If both folders are not found then call ynh_die
|
||||||
else
|
else
|
||||||
ynh_die "No squid folder found in /etc. Looks like squid 3 package is not installed. Try installing it manually by apt-get install squid3"
|
ynh_die "No squid folder found in /etc. Looks like squid 3 package is not installed. Try installing it manually by apt-get install squid3"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ynh_replace_string "__PORT__" "$port" "../conf/squid.conf"
|
||||||
|
ynh_replace_string "__SQUID__" "$squid" "../conf/squid.conf"
|
||||||
|
cp -f "../conf/squid.conf" "/etc/$squid/."
|
||||||
# Save squid folder
|
# Save squid folder
|
||||||
ynh_app_setting_set $app squid_folder $squid
|
ynh_app_setting_set $app squid_folder $squid
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue