logrotate 367 B

1234567891011121314151617
  1. #!/bin/sh
  2. if [ -f /etc/conf.d/logrotate ]; then
  3. . /etc/conf.d/logrotate
  4. fi
  5. if [ -x /usr/bin/cpulimit ] && [ -n "$CPULIMIT" ]; then
  6. _cpulimit="/usr/bin/cpulimit --limit=$CPULIMIT"
  7. fi
  8. $_cpulimit /usr/sbin/logrotate /etc/logrotate.conf
  9. EXITVALUE=$?
  10. if [ $EXITVALUE != 0 ]; then
  11. /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
  12. fi
  13. exit 0