HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/thread-self/root/var/lib/dpkg/info/sa-compile.postinst
#!/bin/sh

set -e

umask 022
output_dir="/var/lib/spamassassin/compiled"

sa_compile() {
    OWNER=$(stat -c '%U' /var/lib/spamassassin)
    GROUP=$(stat -c '%G' /var/lib/spamassassin)
    if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile ]; then
        echo "Running sa-compile (may take a long time)"
        if [ -d "$output_dir" ]; then
            rm -rf "$output_dir"
        fi

        env -i LANG="$LANG" PATH="$PATH" http_proxy="$http_proxy" \
            start-stop-daemon --chuid $OWNER:$GROUP --start \
            --exec /usr/bin/sa-compile -- --quiet
        # Fixup perms -- group and other should be able to
        # read and execute, but never write.  Works around
        # sa-compile's failure to obey umask.
        if [ -d "$output_dir" ]; then
            runuser -u $OWNER -- \
                chmod -R go-w,go+rX "$output_dir"
        fi
        if command -v invoke-rc.d >/dev/null 2>&1; then
            invoke-rc.d --quiet spamassassin status > /dev/null && \
              invoke-rc.d spamassassin reload > /dev/null 2>&1 || true
        else
            /etc/init.d/spamassassin reload > /dev/null 2>&1 || true
        fi
    fi
}

if [ "$1" = "configure" ]; then
    sa_compile
fi

if [ "$1" = "triggered" ] && [ "$2" = "perl-major-upgrade" ]; then
    sa_compile
fi



# Local variables:
# mode: shell-script
# tab-width: 4
# indent-tabs-mode: nil
# end: