From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3BDE220711 for ; Fri, 8 Jul 2016 21:16:13 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] examples: add logrotate sample to show USR1 reopening Date: Fri, 8 Jul 2016 21:16:11 +0000 Message-Id: <20160708211611.1623-3-e@80x24.org> In-Reply-To: <20160708211611.1623-1-e@80x24.org> References: <20160708211611.1623-1-e@80x24.org> List-Id: Same as nginx :> --- MANIFEST | 1 + examples/logrotate.conf | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 examples/logrotate.conf diff --git a/MANIFEST b/MANIFEST index 9864bb3..ceb1a9d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -20,6 +20,7 @@ examples/apache2_perl.conf examples/apache2_perl_old.conf examples/cgi-webrick.rb examples/cgit-commit-filter.lua +examples/logrotate.conf examples/public-inbox-config examples/public-inbox-httpd.socket examples/public-inbox-httpd@.service diff --git a/examples/logrotate.conf b/examples/logrotate.conf new file mode 100644 index 0000000..4ce0884 --- /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 +} -- EW