File: cron.daily

package info (click to toggle)
debsums 2.2.3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 592 kB
  • sloc: perl: 967; sh: 96; makefile: 19
file content (23 lines) | stat: -rwxr-xr-x 532 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

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

[ -x $debsums ] || exit 0

# source our config
. /etc/default/debsums
[ "z$CRON_CHECK" = "zdaily" ] || 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