fix(logrotate): ensure log rotate runs
Deleted the standard logrotate job from cron.daily and created a new cron job to force run logrotate at `00:01` MR !7
This commit is contained in:
@ -82,7 +82,8 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends
|
|||||||
# Cleanup, remove cron jobs not required
|
# Cleanup, remove cron jobs not required
|
||||||
RUN rm -f /etc/cron.d/e2scrub_all \
|
RUN rm -f /etc/cron.d/e2scrub_all \
|
||||||
&& rm -f /etc/cron.daily/apt-compat \
|
&& rm -f /etc/cron.daily/apt-compat \
|
||||||
&& rm -f /etc/cron.daily/dpkg
|
&& rm -f /etc/cron.daily/dpkg \
|
||||||
|
&& rm -f /etc/cron.daily/logrotate
|
||||||
|
|
||||||
|
|
||||||
COPY include/ /
|
COPY include/ /
|
||||||
|
6
include/etc/cron.d/logrotate
Normal file
6
include/etc/cron.d/logrotate
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#
|
||||||
|
# Run Log rotate
|
||||||
|
#
|
||||||
|
# m h dom mon dow user command
|
||||||
|
1 0 * * * root /usr/sbin/logrotate -f /etc/logrotate.conf >/dev/null
|
||||||
|
|
Reference in New Issue
Block a user