File: cron.daily

package info (click to toggle)
aptitude-robot 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 520 kB
  • sloc: sh: 704; perl: 536; makefile: 32
file content (27 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (2)
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
set -e

if [ -f /etc/default/aptitude-robot ] ; then
    . /etc/default/aptitude-robot
else
    :
fi

if [ "$RUN_DAILY" = "no" ]; then
    exit
fi

run_if_executable () {
    if [ -x "$1" ] ; then
        "$@"
    else
        :
    fi
}

run_if_executable /usr/share/aptitude-robot/random-delay $MAX_RANDOM_DELAY_SECONDS
if [ "$SUPPRESS_CRON_MAILS" = yes ]; then
    run_if_executable /usr/sbin/aptitude-robot-session || true
else
    run_if_executable /usr/sbin/aptitude-robot-session
fi