about summary refs log tree commit homepage
path: root/examples/logrotate.conf
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-07 01:06:45 +0000
committerEric Wong <e@80x24.org>2016-07-07 01:13:54 +0000
commit84989a48f20d1bc383a9925b919edc66fc4bccdb (patch)
tree365cdf35b369a67f3139f1aa15f12b4b8f558373 /examples/logrotate.conf
parent97ef2a9c592fbdb756aa6a73e2e6c90b6b3cda18 (diff)
downloadyahns-84989a48f20d1bc383a9925b919edc66fc4bccdb.tar.gz
Reduce raciness in the init script and add LSB tags.
However, the systemd examples should be race-free and
safer (if one feels safe using systemd :P)
Diffstat (limited to 'examples/logrotate.conf')
-rw-r--r--examples/logrotate.conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/logrotate.conf b/examples/logrotate.conf
index ebc92a5..b0d1351 100644
--- a/examples/logrotate.conf
+++ b/examples/logrotate.conf
@@ -25,6 +25,11 @@
         # config.  yahns supports the USR1 signal and we send it
         # as our "lastaction" action:
         lastaction
+                # systemd users do not have PID files,
+                # only signal the @1 process since the @2 is short-lived
+                # and only runs while @1 is restarting.
+                systemctl kill -s SIGUSR1 yahns@1.service
+
                 # assuming your pid file is in /var/run/yahns_app/pid
                 pid=/var/run/yahns_app/pid
                 test -s $pid && kill -USR1 "$(cat $pid)"