Web lists-archives.com

Re: [Samba] Logrotate





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



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba