mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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:
parent
4d57ec04ac
commit
1889e399dd
@ -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
|
|
||||||
@ -5,9 +5,9 @@
|
|||||||
# to you under the Apache License, Version 2.0 (the
|
# to you under the Apache License, Version 2.0 (the
|
||||||
# "License"); you may not use this file except in compliance
|
# "License"); you may not use this file except in compliance
|
||||||
# with the License. You may obtain a copy of the License at
|
# with the License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing,
|
# Unless required by applicable law or agreed to in writing,
|
||||||
# software distributed under the License is distributed on an
|
# software distributed under the License is distributed on an
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
@ -16,7 +16,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
/var/log/cloud.log {
|
/var/log/cloud.log {
|
||||||
rotate 4
|
rotate 4
|
||||||
daily
|
|
||||||
size 10M
|
size 10M
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
/var/log/conntrackd-stats.log {
|
/var/log/conntrackd-stats.log {
|
||||||
daily
|
|
||||||
size 10M
|
size 10M
|
||||||
rotate 2
|
rotate 2
|
||||||
missingok
|
missingok
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
/var/log/dnsmasq.log {
|
/var/log/dnsmasq.log {
|
||||||
daily
|
|
||||||
size 10M
|
size 10M
|
||||||
missingok
|
missingok
|
||||||
rotate 5
|
rotate 5
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
/var/log/haproxy.log {
|
/var/log/haproxy.log {
|
||||||
daily
|
|
||||||
rotate 5
|
rotate 5
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
size 10M
|
size 10M
|
||||||
postrotate
|
postrotate
|
||||||
/bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true
|
/bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
/var/log/ppp-connect-errors {
|
/var/log/ppp-connect-errors {
|
||||||
daily
|
|
||||||
size 10M
|
size 10M
|
||||||
rotate 5
|
rotate 5
|
||||||
missingok
|
missingok
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
/var/log/syslog
|
/var/log/syslog
|
||||||
{
|
{
|
||||||
rotate 7
|
rotate 7
|
||||||
daily
|
|
||||||
size 50M
|
size 50M
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
@ -26,7 +25,6 @@
|
|||||||
/var/log/messages
|
/var/log/messages
|
||||||
{
|
{
|
||||||
rotate 10
|
rotate 10
|
||||||
daily
|
|
||||||
size 50M
|
size 50M
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user