From 62994e689260f361a46b908bb0268ca0fd40ad8c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 7 Feb 2019 15:08:19 +0100 Subject: check if PID exists before killing it, from upstream --- unit.logrotate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'unit.logrotate') diff --git a/unit.logrotate b/unit.logrotate index a8340a9..8fb0019 100644 --- a/unit.logrotate +++ b/unit.logrotate @@ -3,6 +3,8 @@ nocreate notifempty postrotate - /bin/kill -SIGUSR1 `cat /var/run/unit/unit.pid` + if [ -f /var/run/unit/unit.pid ]; then + /bin/kill -SIGUSR1 `cat /var/run/unit/unit.pid` + fi endscript } -- cgit