HEX
Server: nginx/1.24.0
System: Linux rtfmfm 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: neo (1001)
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: /var/lib/dpkg/info/lxd-agent-loader.postinst
#!/bin/sh

set -e

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

    # Version 0.6 switched to udev activation and removed the ConditionVirtualization=
    # causing upgraded systems to keep trying to start the lxd-agent.service even if udev
    # didn't ask for it. Fix it by removing the bogus units left behind:
    if dpkg --compare-versions "$2" lt '0.7'; then
        reload=0

        # Cleanup former units.
        for f in /lib/systemd/system/lxd-agent-9p.service \
            /lib/systemd/system/lxd-agent-virtiofs.service \
            /etc/systemd/system/multi-user.target.wants/lxd-agent-9p.service \
            /etc/systemd/system/multi-user.target.wants/lxd-agent-virtiofs.service \
            /etc/systemd/system/multi-user.target.wants/lxd-agent.service; do
            [ -e "${f}" ] || continue
            rm -f "${f}"
            reload=1
        done

        # Reload systemd if former units were cleaned up.
        if [ "${reload}" != 0 ]; then
            systemctl --system daemon-reload >/dev/null || true
        fi
    fi
fi

# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ]; then
		systemctl --system daemon-reload >/dev/null || true
		deb-systemd-invoke start 'lxd-agent.service' >/dev/null || true
	fi
fi
# End automatically added section


exit 0