From: Anton Yuzhaninov Date: Fri, 9 Aug 2019 10:53:33 +0000 (+0100) Subject: [Minor] Simplify logrotate postrotate script X-Git-Tag: 2.0~452^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F3001%2Fhead;p=rspamd.git [Minor] Simplify logrotate postrotate script Tested on CentOS 7. --- diff --git a/centos/sources/rspamd.logrotate.systemd b/centos/sources/rspamd.logrotate.systemd index f6536d058..ea1b02d7c 100644 --- a/centos/sources/rspamd.logrotate.systemd +++ b/centos/sources/rspamd.logrotate.systemd @@ -6,6 +6,6 @@ compress sharedscripts postrotate - export `systemctl -p MainPID show rspamd.service`; if [ -n "$MainPID" ]; then kill -USR1 $MainPID; fi + systemctl --signal=USR1 --kill-who=main kill rspamd.service 2>/dev/null || : endscript -} \ No newline at end of file +}