]> git.pld-linux.org Git - packages/logrotate.git/blob - logrotate.cron
move cron script to sources instead of patching 95% of the file
[packages/logrotate.git] / logrotate.cron
1 #!/bin/sh
2
3 MAILTO=""
4 ARG=""
5
6 if [ -e /etc/sysconfig/logrotate ]; then
7         . /etc/sysconfig/logrotate
8 fi
9
10 /usr/sbin/logrotate $ARG /etc/logrotate.conf
11 EXITVALUE=$?
12 if [ $EXITVALUE != 0 ]; then
13         /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
14         if [ -n "$MAILTO" ]; then
15                 echo "ALERT exited abnormally with [$EXITVALUE]" |  mail -s "logrotate exited abnormally" $MAILTO
16         fi
17 fi
18 exit 0
This page took 0.022243 seconds and 3 git commands to generate.