commit 69a01b6: [Minor] Simplify logrotate postrotate script

Anton Yuzhaninov citrin+git at citrin.ru
Sun Aug 11 08:56:03 UTC 2019


Author: Anton Yuzhaninov
Date: 2019-08-09 11:53:33 +0100
URL: https://github.com/rspamd/rspamd/commit/69a01b6d670d1c2fb310271d6d0398cda843053c (refs/pull/3001/head)

[Minor] Simplify logrotate postrotate script
Tested on CentOS 7.

---
 centos/sources/rspamd.logrotate.systemd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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
+}


More information about the Commits mailing list