]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Simplify logrotate postrotate script 3001/head
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Fri, 9 Aug 2019 10:53:33 +0000 (11:53 +0100)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Fri, 9 Aug 2019 10:53:33 +0000 (11:53 +0100)
Tested on CentOS 7.

centos/sources/rspamd.logrotate.systemd

index f6536d058d7e34dd19b2ea611acfd9254e6c8707..ea1b02d7c15fa4927939ed814333a639896c7ba6 100644 (file)
@@ -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
+}