[Pkg-samba-maint] [samba] 02/04: 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 21 06:19:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
sathieu pushed a commit to branch master
in repository samba.
commit d5518bbdc71c4c6cd7bf51c80af2cb9f4b56b21d
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)
---
debian/samba.logrotate | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/samba.logrotate b/debian/samba.logrotate
index b41ec7b..6c19e28 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