From 12c8b04255dbca07b2a6b491a0531ac3dc2bceec Mon Sep 17 00:00:00 2001 From: Rakesh Venkatesh Date: Fri, 18 Jun 2021 14:39:07 +0200 Subject: [PATCH 1/2] Change logrotate interval to hourly The logrotate config says interval as hourly but it relies on timer service to be invoked but in timer the frequency is mentioned as 12h. So it wont be invoked every hour. So change the frequency to hourly --- systemvm/debian/opt/cloud/bin/setup/router.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systemvm/debian/opt/cloud/bin/setup/router.sh b/systemvm/debian/opt/cloud/bin/setup/router.sh index 7c9549354e11..e8f6edf0ceb5 100755 --- a/systemvm/debian/opt/cloud/bin/setup/router.sh +++ b/systemvm/debian/opt/cloud/bin/setup/router.sh @@ -100,6 +100,13 @@ setup_router() { mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 fi + # Setup hourly lograte in systemd timer + sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer + sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer + + # reload daemon + /usr/bin/systemctl daemon-reload + # Load modules to support NAT traversal in VR modprobe nf_nat_pptp } From 0be1ad08467307ac597d9553b0c9371e1a88b355 Mon Sep 17 00:00:00 2001 From: Rakesh Venkatesh Date: Tue, 22 Jun 2021 10:01:11 +0200 Subject: [PATCH 2/2] Add change to vpc router --- systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh index 68877821fb32..f97fb161f47f 100755 --- a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh +++ b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh @@ -113,6 +113,13 @@ EOF mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 fi + # Setup hourly lograte in systemd timer + sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer + sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer + + # reload daemon + /usr/bin/systemctl daemon-reload + # Load modules to support NAT traversal in VR modprobe nf_nat_pptp }