about summary refs log tree commit homepage
path: root/examples/logrotate.conf
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-08 21:12:26 +0000
committerEric Wong <e@80x24.org>2016-07-08 21:15:18 +0000
commit7892892a89e4fb9ce618c66e9f3d61f680ba7372 (patch)
tree49bfa7b56a879be5b49e1d9d0099acf1b90602c8 /examples/logrotate.conf
parent193e1b8b08de72ae1675260436aab10e2bb44e99 (diff)
downloadpublic-inbox-7892892a89e4fb9ce618c66e9f3d61f680ba7372.tar.gz
Same as nginx :>
Diffstat (limited to 'examples/logrotate.conf')
-rw-r--r--examples/logrotate.conf24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/logrotate.conf b/examples/logrotate.conf
new file mode 100644
index 00000000..4ce08843
--- /dev/null
+++ b/examples/logrotate.conf
@@ -0,0 +1,24 @@
+# ==> /etc/logrotate.d/public-inbox <==
+#
+# See the logrotate(8) manpage for more information:
+#    http://linux.die.net/man/8/logrotate
+/var/log/public-inbox/*.log {
+        weekly
+        missingok
+        rotate 52
+        compress
+        delaycompress
+        notifempty
+        sharedscripts
+        dateext
+        # note the lack of the racy "copytruncate" option in this
+        # config.  public-inbox-*d supports the USR1 signal and
+        # we send it as our "lastaction":
+        lastaction
+                # systemd users do not need PID files,
+                # only signal the @1 process since the @2 is short-lived
+                # For systemd users, assuming you use two services
+                systemctl kill -s SIGUSR1 public-inbox-httpd@1.service
+                systemctl kill -s SIGUSR1 public-inbox-nntpd@1.service
+        endscript
+}