1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/crontab/squid mezzanine_patched_e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/crontab/squid |
2 |
--- e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/crontab/squid 1969-12-31 17:00:00.000000000 -0700 |
3 |
+++ mezzanine_patched_e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/crontab/squid 2007-01-13 13:46:51.000000000 -0700 |
4 |
@@ -0,0 +1,20 @@ |
5 |
+{ |
6 |
+ return "# squid is disabled\n" unless $squid{status} eq 'enabled'; |
7 |
+ |
8 |
+ my $freq = $squid{Rotate} || 'daily'; |
9 |
+ my $min = int(rand(60)); |
10 |
+ my $hour = int(rand(5)); |
11 |
+ my $dow = substr(localtime,0,3); |
12 |
+ |
13 |
+ if ($freq eq 'hourly') { |
14 |
+ return "$min * * * * root squid -k rotate\n"; |
15 |
+ } elsif ($freq eq 'weekly') { |
16 |
+ return "$min $hour * * $dow root squid -k rotate\n"; |
17 |
+ } elsif ($freq eq 'monthly') { |
18 |
+ return "$min $hour 15 * * root squid -k rotate\n"; |
19 |
+ } elsif ($freq eq 'disabled') { |
20 |
+ return "# squid rotate disabled\n"; |
21 |
+ } else { |
22 |
+ return "$min $hour * * * root squid -k rotate\n" |
23 |
+ } |
24 |
+} |
25 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/squid/squid.conf/25LogfileRotate mezzanine_patched_e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/squid/squid.conf/25LogfileRotate |
26 |
--- e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/squid/squid.conf/25LogfileRotate 1969-12-31 17:00:00.000000000 -0700 |
27 |
+++ mezzanine_patched_e-smith-proxy-4.14.0/root/etc/e-smith/templates/etc/squid/squid.conf/25LogfileRotate 2007-01-13 13:36:04.000000000 -0700 |
28 |
@@ -0,0 +1 @@ |
29 |
+logfile_rotate 0 |