diff options
Diffstat (limited to 'debian/samba.logrotate')
-rw-r--r-- | debian/samba.logrotate | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/samba.logrotate b/debian/samba.logrotate new file mode 100644 index 0000000..9c7c342 --- /dev/null +++ b/debian/samba.logrotate @@ -0,0 +1,40 @@ +/var/log/samba/log.smbd { + weekly + missingok + rotate 7 + postrotate + [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/smbd.pid ] || /usr/bin/smbcontrol smbd reload-config + endscript + compress + delaycompress + notifempty +} + +/var/log/samba/log.nmbd { + weekly + missingok + rotate 7 + postrotate + [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/nmbd.pid ] || /usr/bin/smbcontrol nmbd reload-config + endscript + compress + delaycompress + notifempty +} + +/var/log/samba/log.samba { + 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 /run/samba/samba.pid ]; then + # This only sends to main pid, See #803924 + kill -HUP `cat /run/samba/samba.pid` + fi + endscript + compress + delaycompress + notifempty +} |