unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: unicorn-public@bogomips.org
Subject: [PATCH] examples/logrotate.conf: update example for systemd
Date: Mon, 20 Jun 2016 20:00:46 +0000	[thread overview]
Message-ID: <20160620200046.GA4221@dcvr.yhbt.net> (raw)

...And add placeholders for other systems
  Leaving out the part for using a backup service :>

	for i in /var/log/unicorn_app/*.log.gz
		curl -sSf -T $i cloud.nsa.gov/store && rm $i

 examples/logrotate.conf | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/examples/logrotate.conf b/examples/logrotate.conf
index 03fefc6..437f6c6 100644
--- a/examples/logrotate.conf
+++ b/examples/logrotate.conf
@@ -3,6 +3,9 @@
 # See the logrotate(8) manpage for more information:
 #    http://linux.die.net/man/8/logrotate
+# public logrotate-related discussion in our archives:
+#    https://bogomips.org/unicorn-public/?q=logrotate
 # Modify the following glob to match the logfiles your app writes to:
 /var/log/unicorn_app/*.log {
@@ -22,7 +25,19 @@
 	# config.  Unicorn supports the USR1 signal and we send it
 	# as our "lastaction" action:
-		# assuming your pid file is in /var/run/unicorn_app/pid
+		# For systemd users, assuming you use two services
+		# (as recommended) to allow zero-downtime upgrades.
+		# Only one service needs to be started, but signaling
+		# both here is harmless as long as they're both enabled
+		systemctl kill -s SIGUSR1 unicorn@1.service
+		systemctl kill -s SIGUSR1 unicorn@2.service
+		# Examples for other process management systems appreciated
+		# Mail us at unicorn-public@bogomips.org
+		# (see above for archives)
+		# If you use a pid file and assuming your pid file
+		# is in /var/run/unicorn_app/pid
 		test -s $pid && kill -USR1 "$(cat $pid)"

                 reply	other threads:[~2016-06-20 20:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160620200046.GA4221@dcvr.yhbt.net \
    --to=e@80x24.org \
    --cc=unicorn-public@bogomips.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).