1 |
michel |
1.1 |
diff -urN e-smith-proxy-5.6.0.old/createlinks e-smith-proxy-5.6.0/createlinks |
2 |
|
|
--- e-smith-proxy-5.6.0.old/createlinks 2008-10-07 21:37:03.000000000 +0400 |
3 |
|
|
+++ e-smith-proxy-5.6.0/createlinks 2020-11-30 20:27:14.883000000 +0400 |
4 |
|
|
@@ -9,6 +9,7 @@ |
5 |
|
|
network-create |
6 |
|
|
network-delete |
7 |
|
|
proxy-update |
8 |
|
|
+ e-smith-proxy-update |
9 |
|
|
)) |
10 |
|
|
{ |
11 |
|
|
templates2events("/etc/httpd/conf/proxy/proxy.pac", $event); |
12 |
|
|
@@ -20,23 +21,42 @@ |
13 |
|
|
network-delete |
14 |
|
|
console-save |
15 |
|
|
proxy-update |
16 |
|
|
+ e-smith-proxy-update |
17 |
|
|
)) |
18 |
|
|
{ |
19 |
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid"); |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
-templates2events("/etc/rc.d/init.d/masq", "proxy-update"); |
23 |
|
|
-templates2events("/etc/crontab", "proxy-update"); |
24 |
|
|
-templates2events("/etc/dhcpd.conf", "proxy-update"); |
25 |
|
|
-safe_symlink("adjust", "root/etc/e-smith/events/proxy-update/services2adjust/masq"); |
26 |
|
|
+foreach $event (qw( |
27 |
|
|
+ proxy-update |
28 |
|
|
+ e-smith-proxy-update |
29 |
|
|
+)) |
30 |
|
|
+{ |
31 |
|
|
+ templates2events("/etc/rc.d/init.d/masq", "$event"); |
32 |
|
|
+ templates2events("/etc/crontab", "$event"); |
33 |
|
|
+ templates2events("/etc/dhcpd.conf", "$event"); |
34 |
|
|
+ safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq"); |
35 |
|
|
+} |
36 |
|
|
|
37 |
|
|
+# remove with systemd |
38 |
|
|
# Daemontools links. |
39 |
|
|
-safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/squid"); |
40 |
|
|
-safe_symlink("../var/service/squid", "root/service/squid"); |
41 |
|
|
+##safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/squid"); |
42 |
|
|
+##safe_symlink("../var/service/squid", "root/service/squid"); |
43 |
|
|
# Runlevel init links. |
44 |
|
|
-safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc7.d/S90squid"); |
45 |
|
|
+##safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc7.d/S90squid"); |
46 |
|
|
safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc6.d/K25squid"); |
47 |
|
|
safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc0.d/K25squid"); |
48 |
|
|
|
49 |
|
|
# Symlink for the cgi. |
50 |
|
|
panel_link("proxy", "manager"); |
51 |
|
|
+ |
52 |
|
|
+#-------------------------------------------------- |
53 |
|
|
+# specific actions for e-smith-proxy-update event |
54 |
|
|
+#-------------------------------------------------- |
55 |
|
|
+$event = "e-smith-proxy-update"; |
56 |
|
|
+ |
57 |
|
|
+templates2events("/etc/systemd/system-preset/49-koozali.preset", $event); |
58 |
|
|
+templates2events("/usr/lib/systemd/system/squid.service.d/50koozali.conf", $event); |
59 |
|
|
+#event_link("systemd-default", $event, "10"); |
60 |
|
|
+event_link("systemd-reload", $event, "94"); |
61 |
|
|
+event_link("reset-unsavedflag", $event, "95"); |
62 |
|
|
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 |
63 |
|
|
--- 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 |
64 |
|
|
+++ 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 |
65 |
|
|
@@ -0,0 +1,12 @@ |
66 |
|
|
+[Service] |
67 |
|
|
+{ |
68 |
|
|
+ # Is there a Files limit in the configuration database |
69 |
|
|
+ $OUT .= "LimitNOFILE="; |
70 |
|
|
+ $OUT .= $squid{MaxFileDesc} || 4096; |
71 |
|
|
+ $OUT .= "\n"; |
72 |
|
|
+} |
73 |
|
|
+#ExecStartPre=-/sbin/e-smith/expand-template /etc/squid/squid.conf |
74 |
|
|
+User=squid |
75 |
|
|
+Group=squid |
76 |
|
|
+# $squid -f $config -sN ---->> $SQUID_CONF |
77 |
|
|
+ |
78 |
|
|
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 |
79 |
|
|
--- 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 |
80 |
|
|
+++ 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 |
81 |
|
|
@@ -0,0 +1,2 @@ |
82 |
|
|
+[Install] |
83 |
|
|
+WantedBy=sme-server.target |
84 |
|
|
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 |
85 |
|
|
--- e-smith-proxy-5.6.0.old/root/var/service/squid/log/run 2004-12-29 20:51:16.000000000 +0400 |
86 |
|
|
+++ e-smith-proxy-5.6.0/root/var/service/squid/log/run 1970-01-01 04:00:00.000000000 +0400 |
87 |
|
|
@@ -1,9 +0,0 @@ |
88 |
|
|
-#!/bin/sh |
89 |
|
|
-#---------------------------------------------------------------------- |
90 |
|
|
-# copyright (C) 1999-2004 Mitel Networks Corporation |
91 |
|
|
-#---------------------------------------------------------------------- |
92 |
|
|
- |
93 |
|
|
-exec \ |
94 |
|
|
- /usr/local/bin/setuidgid smelog \ |
95 |
|
|
- /usr/local/bin/multilog t s5000000 \ |
96 |
|
|
- /var/log/squid.run |
97 |
|
|
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 |
98 |
|
|
--- e-smith-proxy-5.6.0.old/root/var/service/squid/run 2020-11-30 13:33:14.000000000 +0400 |
99 |
|
|
+++ e-smith-proxy-5.6.0/root/var/service/squid/run 1970-01-01 04:00:00.000000000 +0400 |
100 |
|
|
@@ -1,22 +0,0 @@ |
101 |
|
|
-#!/bin/sh |
102 |
|
|
-#---------------------------------------------------------------------- |
103 |
|
|
-# copyright (C) 1999-2005 Mitel Networks Corporation |
104 |
|
|
-#---------------------------------------------------------------------- |
105 |
|
|
- |
106 |
|
|
-exec 2>&1 |
107 |
|
|
-squid=/usr/sbin/squid |
108 |
|
|
-config=/etc/squid/squid.conf |
109 |
|
|
-file_descr=$(/sbin/e-smith/db configuration getprop squid MaxFileDesc || echo 4096) |
110 |
|
|
- |
111 |
|
|
-[ -e $squid ] || exit 1 |
112 |
|
|
-[ -e $config ] || exit 1 |
113 |
|
|
- |
114 |
|
|
-# Initialize the squid cache if necessary. |
115 |
|
|
-if [ ! -e "/var/spool/squid/00" ]; then |
116 |
|
|
- echo "Initializing squid cache..." |
117 |
|
|
- $squid -z -f $config |
118 |
|
|
-fi |
119 |
|
|
- |
120 |
|
|
-ulimit -Hn $file_descr |
121 |
|
|
-exec /usr/local/bin/setuidgid squid \ |
122 |
|
|
- $squid -f $config -sN |