1
0
Fork 0
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:
anmol26s 2018-09-28 16:22:49 +05:30
parent 7d561eaeb8
commit 891a8f675a
3 changed files with 13 additions and 12 deletions

View file

@ -21,7 +21,7 @@ acl purge method PURGE
acl CONNECT method CONNECT
###Directive pour nautoriser 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 realm Web-Proxy
@ -44,9 +44,9 @@ dns_nameservers 127.0.0.1
##Port d'écoute du Proxy
http_port __PORT__
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 ?
access_log /var/log/squid3/access.log squid
access_log /var/log/__SQUID__/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0

View file

@ -66,19 +66,19 @@ ynh_install_app_dependencies squid3 mailutils
# See is squid3 folder is there
if [ -d "/etc/squid3" ]; then
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
elif [ -d "/etc/squid" ]; then
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
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"
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
ynh_app_setting_set $app squid_folder $squid

View file

@ -57,19 +57,20 @@ yunohost firewall allow --no-upnp TCP $port
# See is squid3 folder is there
if [ -d "/etc/squid3" ]; then
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
elif [ -d "/etc/squid" ]; then
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
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"
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
ynh_app_setting_set $app squid_folder $squid