[Pkg-samba-maint] [samba] 11/12: Fix logrotate for /var/log/samba/log.samba to send SIGHUP to all processes of the service (systemd only)

Mathieu Parent sathieu at moszumanska.debian.org
Fri Jul 28 19:14:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

sathieu pushed a commit to branch stretch
in repository samba.

commit d2605c35c39864e365e7f25f5fc0281b8727da0c
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Thu Jul 20 14:48:21 2017 +0200

    Fix logrotate for /var/log/samba/log.samba to send SIGHUP to all processes of the service (systemd only)
    
    (cherry picked from commit d5518bbdc71c4c6cd7bf51c80af2cb9f4b56b21d)
---
 debian/samba.logrotate | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/samba.logrotate b/debian/samba.logrotate
index 556c4a2..0b0ed9b 100644
--- a/debian/samba.logrotate
+++ b/debian/samba.logrotate
@@ -27,7 +27,12 @@
 	missingok
 	rotate 7
 	postrotate
-		[ ! -f /var/run/samba/samba.pid ] || kill -HUP `cat /var/run/samba/samba.pid`
+		if [ -d /run/systemd/system ] && command systemctl >/dev/null 2>&1 && systemctl is-active --quiet samba-ad-dc; then
+			 systemctl kill --kill-who all --signal=SIGHUP samba-ad-dc
+		elsif [ -f /var/run/samba/samba.pid ]; then
+			# This only sends to main pid, See #803924
+			kill -HUP `cat /var/run/samba/samba.pid`
+		fi
 	endscript
 	compress
 	delaycompress

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list