systemvm, logrotate: remove daily explicitly as it is ignored

If the size directive is used, logrotate will ignore the daily, weekly, monthly,
and yearly directives.

remove cloud-cleanup

This script does not do anything because it fails due missing /var/log/cloud directory. Logrotate is used for this functionality.
This commit is contained in:
Rene Moser 2016-02-16 11:21:30 +01:00
parent 4d57ec04ac
commit 1889e399dd
7 changed files with 3 additions and 37 deletions

View File

@ -1,27 +0,0 @@
#!/bin/sh
# /etc/cron.daily/cloud-cleanup: cleanup old cloudstack logs
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
cd /
output=$(find /var/log/cloud -mtime +7 -size +1M -exec rm -v '{}' \; )
logger -t cloud "cloud-cleanup cronjob: cleaning up logfiles in /var/log/cloud older than 7 days and more than 1M in size"
[ "$output" != "" ] && logger -t cloud $output
[ -z "$output" ] && logger -t cloud "No files removed"
exit 0

View File

@ -5,9 +5,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -16,7 +16,6 @@
# under the License.
/var/log/cloud.log {
rotate 4
daily
size 10M
missingok
notifempty

View File

@ -1,5 +1,4 @@
/var/log/conntrackd-stats.log {
daily
size 10M
rotate 2
missingok

View File

@ -1,5 +1,4 @@
/var/log/dnsmasq.log {
daily
size 10M
missingok
rotate 5

View File

@ -1,10 +1,9 @@
/var/log/haproxy.log {
daily
rotate 5
missingok
notifempty
size 10M
postrotate
postrotate
/bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,5 +1,4 @@
/var/log/ppp-connect-errors {
daily
size 10M
rotate 5
missingok

View File

@ -1,7 +1,6 @@
/var/log/syslog
{
rotate 7
daily
size 50M
missingok
notifempty
@ -26,7 +25,6 @@
/var/log/messages
{
rotate 10
daily
size 50M
missingok
notifempty