]> git.pld-linux.org Git - packages/logrotate.git/blob - logrotate-cron.patch
BR; libselinux-utils for selinuxenabled tool to see if selinux tests can be ran
[packages/logrotate.git] / logrotate-cron.patch
1 --- logrotate-3.7.9/examples/logrotate.cron~    2010-06-28 11:04:56.000000000 +0300
2 +++ logrotate-3.7.9/examples/logrotate.cron     2010-07-12 10:42:34.890404991 +0300
3 @@ -1,8 +1,18 @@
4  #!/bin/sh
5  
6 -/usr/sbin/logrotate /etc/logrotate.conf
7 +MAILTO=""
8 +ARG=""
9 +
10 +if [ -e /etc/sysconfig/logrotate ]; then
11 +       . /etc/sysconfig/logrotate
12 +fi
13 +
14 +/usr/sbin/logrotate $ARG /etc/logrotate.conf
15  EXITVALUE=$?
16  if [ $EXITVALUE != 0 ]; then
17 -    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
18 +       /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
19 +       if [ -n "$MAILTO" ]; then
20 +               echo "ALERT exited abnormally with [$EXITVALUE]" |  mail -s "logrotate exited abnormally" $MAILTO
21 +       fi
22  fi
23  exit 0
This page took 0.064483 seconds and 3 git commands to generate.