HEX
Server: nginx/1.18.0
System: Linux hqnl0246134.online-vm.com 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: phpinfo,disk_free_space,disk_total_space,diskfreespace,dl,exec,opcache_get_configuration,opcache_get_status,passthru,pclose,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_waitpid,pcntl_wait,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,show_source,system,exec,passthru,shell_exec,system,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /var/lib/dpkg/info/rkhunter.postinst
#! /bin/sh
# postinst script for rkhunter

set -e

. /usr/share/debconf/confmodule

case "$1" in
    configure)

        tempfile=`mktemp`
        cp -p /usr/share/rkhunter/default.conf ${tempfile}

        # Merge debconf values into the configuration
        for foo in CRON_DB_UPDATE CRON_DAILY_RUN APT_AUTOGEN; do
                template=$(echo ${foo} | tr '[:upper:]' '[:lower:]')
                db_get rkhunter/${template}
                sed -i -re "s@^(${foo}=).*@\1\"${RET}\"@" "$tempfile"
        done

        ucf --debconf-ok ${tempfile} /etc/default/rkhunter
        ucfr rkhunter /etc/default/rkhunter
        rm -f ${tempfile}

        # Copy the passwd/group files to the TMP directory
        # to avoid warnings when rkhunter is first run.
        # This is normally done by the installer script.
        rkhtmpdir=/var/lib/rkhunter/tmp
        if [ -e "/etc/rkhunter.conf" ]; then
            rkhtmpdir=$(grep '^TMPDIR' /etc/rkhunter.conf | sed 's/TMPDIR=//')
        fi
        [ -f $rkhtmpdir/passwd ] || cp -p /etc/passwd $rkhtmpdir >/dev/null 2>&1
        [ -f $rkhtmpdir/group ] || cp -p /etc/group $rkhtmpdir >/dev/null 2>&1

        # Only update the file properties database if the hashes and attributes
        # tests are not disabled either in /etc/rkhunter.conf AND if the automatic
        # database update is disabled in case of an upgrade (in order to avoid calling
        # --propupd twice (see #471389)
        #
        # TODO: check what needs to be done on reconfigure
        # (note: debconf sets $DEBCONF_RECONFIGURE=1 when a package is reconfigured)

        # UPGRADE
        if [ -n "$2" ]; then
            if [ "$APT_AUTOGEN" = "false" ]; then
                /usr/share/rkhunter/scripts/rkhupd.sh || true
            fi

        # CLEAN INSTALL
        else
            /usr/share/rkhunter/scripts/rkhupd.sh || true
        fi
    ;;

    triggered)
        # only active if APT_AUTOGEN is disabled
        grep -qiE '^APT_AUTOGEN=.?(true|yes)' /etc/default/rkhunter || /usr/share/rkhunter/scripts/rkhupd.sh || true
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac



exit 0