File: cron.monthly

package info (click to toggle)
debsums 3.0.2.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 576 kB
  • sloc: perl: 995; sh: 59; makefile: 19
file content (27 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

debsums="/usr/bin/debsums"
ignorefile="/etc/debsums-ignore"

[ -x $debsums ] || exit 0

if ! [ -e "$ignorefile" ]; then
    ignorefile="/dev/null"
fi

# source our config
. /etc/default/debsums
[ "z$CRON_CHECK" = "zmonthly" ] || exit 0

# See ionice(1)
if [ -x /usr/bin/ionice ] &&
    /usr/bin/ionice -c3 true 2>/dev/null; then
    IONICE="/usr/bin/ionice -c3"
fi

exec 3>&1

$IONICE $debsums -cs 2>&1 | egrep -vf "$ignorefile" | tee /proc/self/fd/3 | sed 's/^debsums: //' | logger -t debsums

# Exit with a normal status code even if errors (which could be ignored) were found
exit 0