#GML # Add notifempty to the rules, and check for the sub-systems being active # in smbd and nmbd (whcih menas changing the "! ||" logic to "&& &&" /var/log/samba/log.smbd { notifempty weekly missingok rotate 7 postrotate [ -x /usr/bin/smbcontrol ] && [ systemctl -q is-active smbd ] && /usr/bin/smbcontrol smbd reload-config endscript compress delaycompress notifempty } /var/log/samba/log.nmbd { notifempty weekly missingok rotate 7 postrotate [ -x /usr/bin/smbcontrol ] && [ systemctl -q is-active nmbd ] && /usr/bin/smbcontrol nmbd reload-config endscript compress delaycompress notifempty } /var/log/samba/log.samba { notifempty weekly missingok rotate 7 postrotate 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 elif [ -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 notifempty }