Pārlūkot izejas kodu

Confiured for log rotation using logrotate

Alois Mahdal 11 gadus atpakaļ
vecāks
revīzija
c5f065fc38
2 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 1
    1
      cgi-bin/htlog/htlog.cgi
  2. 7
    0
      etc/logrotate.d/htlogr

+ 1
- 1
cgi-bin/htlog/htlog.cgi Parādīt failu

@@ -18,7 +18,7 @@
18 18
 
19 19
 use CGI;
20 20
 
21
-my $LOG_FILE = 'htlog.log';
21
+my $LOG_FILE = '/var/log/htlogr.log';
22 22
 open my $fh, ">>", $LOG_FILE or die "cannot open log file for appending: $!";
23 23
 
24 24
 sub stamp {

+ 7
- 0
etc/logrotate.d/htlogr Parādīt failu

@@ -0,0 +1,7 @@
1
+/var/log/htlogr.log {
2
+    weekly
3
+    rotate 8
4
+    compress
5
+    delaycompress
6
+    create 640 www-data adm
7
+}