systemvm: Change logrotate interval to hourly (#5132)

* 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

* Add change to vpc router
This commit is contained in:
Rakesh 2021-06-24 07:37:06 +02:00 committed by GitHub
parent 0eeb094949
commit faa57434ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -100,6 +100,13 @@ setup_router() {
mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
fi 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 # Load modules to support NAT traversal in VR
modprobe nf_nat_pptp modprobe nf_nat_pptp
} }

View File

@ -113,6 +113,13 @@ EOF
mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
fi 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 # Load modules to support NAT traversal in VR
modprobe nf_nat_pptp modprobe nf_nat_pptp
} }