[Samba] Logrotate

Reindl Harald h.reindl at thelounge.net
Mon May 14 19:08:22 UTC 2018



Am 14.05.2018 um 20:56 schrieb Carlos via samba:
> /opt/samba/var/log.samba
> 
> {
>   rotate 10
>         daily
>         compress
>         dateext
>         size 100M
>         nomail
>         missingok
>         notifempty
>         create 644 root root
>         #postrotate
>         #        systemctl stop samba &> /dev/null
>         #        systemctl start samba &> /dev/null
>         #endscript
> }
> 
> -- 
> 
> 
> My problem is, when logrotate is executed, log is rotate but after ,
> don't log messages anymore, log.samba is was"zero"., is need restart in
> samba, then log message is back

that's why postrotate and SIGHUP exists
a proper systemd unit should have ExecReload

if not make a drop-in: /etc/systemd/system/samba.service.d/reload.conf
[Service]
ExecReload=/usr/bin/kill -HUP $MAINPID

after create folder and file: systemctl daemon-reload

stop/sart would be wrong anyways - that's what RESTART is for





More information about the samba mailing list