File: config

package info (click to toggle)
rkhunter 1.4.6-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,140 kB
  • sloc: sh: 14,367; perl: 120; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 879 bytes parent folder | download | duplicates (5)
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
28
29
30
31
32
33
#!/bin/sh

set -e
. /usr/share/debconf/confmodule

db_title "rkhunter" || true

# Sync debconf values with the local configuration
if [ -r /etc/default/rkhunter ]; then
        . /etc/default/rkhunter
        db_set rkhunter/cron_db_update "$CRON_DB_UPDATE"
        db_set rkhunter/cron_daily_run "$CRON_DAILY_RUN"
        db_set rkhunter/apt_autogen "$APT_AUTOGEN"
fi

# POSIX-compliant shell function to check the path for an executable
pathfind() {
    OLDIFS="$IFS"
    IFS=:
    for p in $PATH; do
        if [ -x "$p/$*" ]; then
            IFS="$OLDIFS"
            return 0
        fi
    done
    IFS="$OLDIFS"
    return 1
}

db_input medium rkhunter/cron_daily_run || true
pathfind wget || pathfind curl || pathfind links || pathfind elinks || pathfind lynx && db_input medium rkhunter/cron_db_update || true
db_input medium rkhunter/apt_autogen || true
db_go || true