Merge "Fixes the concurrent execution of logrotate" into stable/0.10
This commit is contained in:
commit
1e9161759f
@ -21,7 +21,7 @@ fail() {
|
|||||||
else
|
else
|
||||||
MESSAGE=$1
|
MESSAGE=$1
|
||||||
fi
|
fi
|
||||||
/usr/bin/logger -t logrotate "${MESSAGE}"
|
/usr/bin/logger -t logrotate "<%= @service_name %> ${MESSAGE}"
|
||||||
unlock
|
unlock
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ lock || fail "WARNING <%= @service_name %> logrotate flock failed, exiting"
|
|||||||
|
|
||||||
|
|
||||||
TMP_FILE=$(/bin/mktemp)
|
TMP_FILE=$(/bin/mktemp)
|
||||||
nice ionice -c3 /usr/sbin/logrotate <%= @logrotate_conf %> >& $TMP_FILE
|
nice ionice -c3 /usr/sbin/logrotate -s /var/lib/logrotate/<%= @service_name %>.status <%= @logrotate_conf %> >& $TMP_FILE
|
||||||
EXITVALUE=$?
|
EXITVALUE=$?
|
||||||
|
|
||||||
if [ -f /etc/redhat-release ] || [ -f /etc/centos-release ];
|
if [ -f /etc/redhat-release ] || [ -f /etc/centos-release ];
|
||||||
|
Loading…
Reference in New Issue
Block a user