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 2008-10-07 21:37:03.000000000 +0400 +++ e-smith-proxy-5.6.0/createlinks 2020-11-30 20:27:14.883000000 +0400 @@ -9,6 +9,7 @@ network-create network-delete proxy-update + e-smith-proxy-update )) { templates2events("/etc/httpd/conf/proxy/proxy.pac", $event); @@ -20,23 +21,42 @@ network-delete console-save proxy-update + e-smith-proxy-update )) { safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid"); } -templates2events("/etc/rc.d/init.d/masq", "proxy-update"); -templates2events("/etc/crontab", "proxy-update"); -templates2events("/etc/dhcpd.conf", "proxy-update"); -safe_symlink("adjust", "root/etc/e-smith/events/proxy-update/services2adjust/masq"); +foreach $event (qw( + proxy-update + e-smith-proxy-update +)) +{ + templates2events("/etc/rc.d/init.d/masq", "$event"); + templates2events("/etc/crontab", "$event"); + templates2events("/etc/dhcpd.conf", "$event"); + 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"); +##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/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"); # Symlink for the cgi. panel_link("proxy", "manager"); + +#-------------------------------------------------- +# specific actions for e-smith-proxy-update event +#-------------------------------------------------- +$event = "e-smith-proxy-update"; + +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"); 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 1970-01-01 04:00:00.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service 2020-11-30 19:34:29.000000000 +0400 @@ -0,0 +1,12 @@ +[Service] +{ + # 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 + diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/80install e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/80install --- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/80install 1970-01-01 04:00:00.000000000 +0400 +++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/80install 2020-11-29 22:21:12.000000000 +0400 @@ -0,0 +1,2 @@ +[Install] +WantedBy=sme-server.target diff -urN e-smith-proxy-5.6.0.old/root/var/service/squid/log/run e-smith-proxy-5.6.0/root/var/service/squid/log/run --- e-smith-proxy-5.6.0.old/root/var/service/squid/log/run 2004-12-29 20:51:16.000000000 +0400 +++ e-smith-proxy-5.6.0/root/var/service/squid/log/run 1970-01-01 04:00:00.000000000 +0400 @@ -1,9 +0,0 @@ -#!/bin/sh -#---------------------------------------------------------------------- -# copyright (C) 1999-2004 Mitel Networks Corporation -#---------------------------------------------------------------------- - -exec \ - /usr/local/bin/setuidgid smelog \ - /usr/local/bin/multilog t s5000000 \ - /var/log/squid.run diff -urN e-smith-proxy-5.6.0.old/root/var/service/squid/run e-smith-proxy-5.6.0/root/var/service/squid/run --- e-smith-proxy-5.6.0.old/root/var/service/squid/run 2020-11-30 13:33:14.000000000 +0400 +++ e-smith-proxy-5.6.0/root/var/service/squid/run 1970-01-01 04:00:00.000000000 +0400 @@ -1,22 +0,0 @@ -#!/bin/sh -#---------------------------------------------------------------------- -# copyright (C) 1999-2005 Mitel Networks Corporation -#---------------------------------------------------------------------- - -exec 2>&1 -squid=/usr/sbin/squid -config=/etc/squid/squid.conf -file_descr=$(/sbin/e-smith/db configuration getprop squid MaxFileDesc || echo 4096) - -[ -e $squid ] || exit 1 -[ -e $config ] || exit 1 - -# Initialize the squid cache if necessary. -if [ ! -e "/var/spool/squid/00" ]; then - echo "Initializing squid cache..." - $squid -z -f $config -fi - -ulimit -Hn $file_descr -exec /usr/local/bin/setuidgid squid \ - $squid -f $config -sN