mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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:
parent
0eeb094949
commit
faa57434ab
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user