don't set listen(2) backlog on inherited sockets
[yahns.git] / examples / logrotate.conf
blob1fd92d0201732cfa16209127e19caf96c3f827da
1 # To the extent possible under law, Eric Wong has waived all copyright and
2 # related or neighboring rights to this examples
4 # example logrotate config file, I usually keep this in
5 # /etc/logrotate.d/yahns_app on my Debian systems
7 # See the logrotate(8) manpage for more information:
8 #    https://linux.die.net/man/8/logrotate
10 # Modify the following glob to match the logfiles your app writes to:
11 /var/log/yahns_app/*.log {
12         # this first block is mostly just personal preference, though
13         # I wish logrotate offered an "hourly" option...
14         daily
15         missingok
16         rotate 180
17         compress # must use with delaycompress below
18         dateext
20         # this is important if using "compress" since we need to call
21         # the "lastaction" script below before compressing:
22         delaycompress
24         # note the lack of the evil "copytruncate" option in this
25         # config.  yahns supports the USR1 signal and we send it
26         # as our "lastaction" action:
27         lastaction
28                 # systemd users do not have PID files,
29                 # only signal the @1 process since the @2 is short-lived
30                 # and only runs while @1 is restarting.
31                 systemctl kill -s SIGUSR1 [email protected]
33                 # assuming your pid file is in /var/run/yahns_app/pid
34                 pid=/var/run/yahns_app/pid
35                 test -s $pid && kill -USR1 "$(cat $pid)"
36         endscript