I have a spare system running GNU/Linux on a Raspberry Pi 2. For various reasons, I have to stop and/or disable some applications. How do I skip logrotate for stopped applications that need restarting, eg: samba, httpd:
I get the following error emailed to me.
/etc/cron.daily/logrotate:
Job for smbd.service failed. See 'systemctl status smbd.service' and 'journalctl -xn' for details.
error: error running non-shared postrotate script for /var/log/samba/log.smbd of '/var/log/samba/log.smbd '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Is there a postrotate/endscript way to skip rotation if smbd and/or nmbd are not running?