File: logrotate.cron

package info (click to toggle)
logrotate 3.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,820 kB
  • sloc: sh: 6,119; ansic: 4,944; makefile: 139
file content (18 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# skip in favour of systemd timer
if [ -d /run/systemd/system ]; then
    exit 0
fi

# this cronjob persists removals (but not purges)
if [ ! -x /usr/sbin/logrotate ]; then
    exit 0
fi

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