diff -urN e-smith-proxy-5.6.0.old/createlinks e-smith-proxy-5.6.0/createlinks --- e-smith-proxy-5.6.0.old/createlinks 2020-12-09 23:58:52.730000000 +0400 +++ e-smith-proxy-5.6.0/createlinks 2020-12-10 00:26:38.006000000 +0400 @@ -38,12 +38,7 @@ safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq"); } -# remove with systemd -# Daemontools links. -##safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/squid"); -##safe_symlink("../var/service/squid", "root/service/squid"); # Runlevel init links. -##safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc7.d/S90squid"); safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc6.d/K25squid"); safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc0.d/K25squid"); @@ -57,6 +52,4 @@ templates2events("/etc/systemd/system-preset/49-koozali.preset", $event); templates2events("/usr/lib/systemd/system/squid.service.d/50koozali.conf", $event); -#event_link("systemd-default", $event, "10"); -event_link("systemd-reload", $event, "94"); -event_link("reset-unsavedflag", $event, "95"); +event_link("systemd-reload", $event, "89"); diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy 2002-10-02 20:12:30.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy 2020-12-10 16:18:48.677000000 +0400 @@ -24,7 +24,8 @@ my $transproxy = $squid{Transparent} || "yes"; my $status = $squid{status} || "disabled"; if ($transproxy eq "yes" && $status eq "enabled") { - my $proxyport = $squid{TransparentPort} || "3128"; + ##my $proxyport = $squid{TransparentPort} || "3128"; + my $proxyport = $squid{InterceptPort} || "8080"; # Otherwise, divert port 80 traffic through our proxy $OUT .= " /sbin/iptables --table nat --append TransProxy\\\n"; diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy 2002-09-12 05:51:21.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy 2020-12-10 16:19:39.318000000 +0400 @@ -16,7 +16,8 @@ my $status = $squid{status} || "disabled"; if ($transproxy eq "yes" && $status eq "enabled") { - my $proxyport = $squid{TransparentPort} || "3128"; + ##my $proxyport = $squid{TransparentPort} || "3128"; + my $proxyport = $squid{InterceptPort} || "8080"; # Otherwise, divert port 80 traffic through our proxy $OUT .= " /sbin/iptables --table nat --replace TransProxy $rule\\\n"; diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort 2008-10-07 21:37:03.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort 2020-12-10 16:17:00.077000000 +0400 @@ -2,10 +2,12 @@ my $transproxy = $squid{Transparent} || "yes"; if ($transproxy eq 'yes') { - $OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . " transparent\n"; - $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . ' transparent'; + $OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . "\n"; + $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . "\n"; + $OUT .= "http_port $LocalIP:" . ($squid{InterceptPort} || '8080') . " intercept\n"; + $OUT .= "http_port 127.0.0.1:" . ($squid{InterceptPort} || '8080') . " intercept\n"; } else { $OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . "\n"; - $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128'); + $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . "\n"; } } diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG 1970-01-01 04:00:00.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG 2020-12-12 00:10:57.820000000 +0400 @@ -0,0 +1,10 @@ +# default squid options +SQUID_OPTS="" + +# Time to wait for Squid to shut down when asked. Should not be necessary +# most of the time. +SQUID_SHUTDOWN_TIMEOUT=100 + +# default squid conf file +SQUID_CONF="/etc/squid/squid.conf" + diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS 1970-01-01 04:00:00.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS 2020-12-12 00:04:56.997000000 +0400 @@ -0,0 +1,4 @@ +# specific squid options +SQUID_OPTS="-s" + + diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service 2020-12-09 23:58:52.730000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service 2020-12-12 00:33:27.983000000 +0400 @@ -1,12 +1,11 @@ [Service] { - # Is there a Files limit in the configuration database - $OUT .= "LimitNOFILE="; - $OUT .= $squid{MaxFileDesc} || 4096; - $OUT .= "\n"; +# Is there a Files limit in the configuration database +$OUT .= "LimitNOFILE="; +$OUT .= $squid{MaxFileDesc} || 4096; +$OUT .= "\n"; } -#ExecStartPre=-/sbin/e-smith/expand-template /etc/squid/squid.conf -User=squid -Group=squid -# $squid -f $config -sN ---->> $SQUID_CONF - +# squid option -s ---->> $SQUID_OPTS +ExecStartPre=/sbin/e-smith/service-status squid +User=root +Group=root