1 |
diff -Nur --no-dereference e-smith-apache-2.6.0.old/createlinks e-smith-apache-2.6.0/createlinks |
2 |
--- e-smith-apache-2.6.0.old/createlinks 2022-02-18 22:15:22.484000000 -0500 |
3 |
+++ e-smith-apache-2.6.0/createlinks 2022-02-18 22:21:57.175000000 -0500 |
4 |
@@ -9,6 +9,7 @@ |
5 |
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
6 |
event_link("systemd-reload", $event, "89"); |
7 |
event_link("systemd-default", $event, "88"); |
8 |
+templates2events("/etc/logrotate.d/httpd", $event); |
9 |
|
10 |
#-------------------------------------------------- |
11 |
# actions for console-save event |
12 |
@@ -168,17 +169,19 @@ |
13 |
|
14 |
$event = "ssl-update"; |
15 |
templates2events("/etc/httpd/conf/httpd.conf", $event); |
16 |
-safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
17 |
+isafe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
18 |
+ |
19 |
+#-------------------------------------------------- |
20 |
+# actions for post-install event |
21 |
+#-------------------------------------------------- |
22 |
|
23 |
+$event = "post-install"; |
24 |
+templates2events("/etc/logrotate.d/httpd", $event); |
25 |
|
26 |
-# Set up generic logfile timestamp renaming/symlinking |
27 |
+#-------------------------------------------------- |
28 |
+# actions for post-upgrade event |
29 |
+#-------------------------------------------------- |
30 |
+ |
31 |
+$event = "post-upgrade"; |
32 |
+templates2events("/etc/logrotate.d/httpd", $event); |
33 |
|
34 |
-foreach (qw( |
35 |
- /var/log/httpd/error_log |
36 |
- /var/log/httpd/access_log |
37 |
- )) |
38 |
-{ |
39 |
- safe_touch "root/etc/e-smith/events/logrotate/logfiles2timestamp/$_"; |
40 |
- safe_touch "root/etc/e-smith/events/post-install/logfiles2timestamp/$_"; |
41 |
- safe_touch "root/etc/e-smith/events/post-upgrade/logfiles2timestamp/$_"; |
42 |
-} |
43 |
diff -Nur --no-dereference e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/httpd/00notused e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/httpd/00notused |
44 |
--- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/httpd/00notused 2008-10-07 11:53:34.000000000 -0400 |
45 |
+++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/httpd/00notused 1969-12-31 19:00:00.000000000 -0500 |
46 |
@@ -1,4 +0,0 @@ |
47 |
-# |
48 |
-# We do not use logrotate to rotate apache controlled logfiles, |
49 |
-# we reconfigure apache instead. No action required here. |
50 |
-# |
51 |
diff -Nur --no-dereference e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/httpd/10global e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/httpd/10global |
52 |
--- e-smith-apache-2.6.0.old/root/etc/e-smith/templates/etc/logrotate.d/httpd/10global 1969-12-31 19:00:00.000000000 -0500 |
53 |
+++ e-smith-apache-2.6.0/root/etc/e-smith/templates/etc/logrotate.d/httpd/10global 2022-02-18 22:49:31.044000000 -0500 |
54 |
@@ -0,0 +1,14 @@ |
55 |
+/var/log/httpd/*log \{ |
56 |
+ create root root |
57 |
+ missingok |
58 |
+ notifempty |
59 |
+ sharedscripts |
60 |
+ rotate {$httpd-e-smith{'KeepNumberLog'} || $rsyslog{'KeepNumber'} || 10 } |
61 |
+ maxsize {$httpd-e-smith{'MaxSizeLog'} || $rsyslog{'MaxSize'} || "100M";} |
62 |
+ maxage {$httpd-e-smith{'PurgeLengthLog'} || $rsyslog{'PurgeLength'} || 95;} |
63 |
+ { $OUT = "compress " unless ( ($httpd-e-smith{'CompressLog'} || "disabled") eq "disabled" );} |
64 |
+ delaycompress |
65 |
+ postrotate |
66 |
+ /bin/systemctl restart httpd-*.service > /dev/null 2>/dev/null || true |
67 |
+ endscript |
68 |
+\} |