aboutsummaryrefslogblamecommitdiffstats
path: root/main/logrotate/logrotate.cron
blob: ad7b3da1a36e0c6a7634a7cc5307af091d285904 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                            
#!/bin/sh

if [ -f /etc/conf.d/logrotate ]; then
	. /etc/conf.d/logrotate
fi

if [ -x /usr/bin/cpulimit ] && [ -n "$CPULIMIT" ]; then
	_cpulimit="/usr/bin/cpulimit --limit=$CPULIMIT"
fi

$_cpulimit /usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0