base-files: uci-defaults: enable log rotation every 10 minutes

Backport cron job setup from commit fb0a7d7bcc84 ("profiles: prpl: fix
various issues in syslog-ng and tr069-manager").

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 2a93b4289725466a1bab6b815afcf3ed7c93a0c4)
This commit is contained in:
Petr Štetiar 2023-01-24 14:31:22 +01:00 committed by Petr Štetiar
parent aaec2d19f5
commit 4c15bddd17
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -0,0 +1,4 @@
grep -s -q /usr/sbin/logrotate /etc/crontabs/root && exit 0
echo "# logrotate runs every 10 minutes" >> /etc/crontabs/root
echo "*/10 * * * * /usr/sbin/logrotate /etc/logrotate.conf" >> /etc/crontabs/root
exit 0