AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.148.115.187


Current Path : /var/lib/dpkg/info/
Upload File :
Current File : //var/lib/dpkg/info/ubuntu-advantage-tools.postrm

#!/bin/sh

set -e


remove_apt_auth(){
    # config file created at runtime, needs explicit handling on purge
    rm -f /etc/apt/auth.conf.d/90ubuntu-advantage
}

remove_cache_dir(){
    rm -rf /var/lib/ubuntu-advantage
}

remove_logs(){
    rm -f /var/log/ubuntu-advantage.log*
    rm -f /var/log/ubuntu-advantage-timer.log*
    rm -f /var/log/ubuntu-advantage-license-check.log*
    rm -f /var/log/ubuntu-advantage-daemon.log*
}

remove_gpg_files(){
    rm -f /etc/apt/trusted.gpg.d/ubuntu-advantage-*.gpg
}

case "$1" in
    purge)
        remove_apt_auth
        remove_cache_dir
        remove_logs
        remove_gpg_files
        ;;
    abort-install|abort-upgrade)
        # LP: #2003977
        # The version gate is open ended, and should be closed when the
        # apt_news configuration is moved away from a conffile.
        if dpkg --compare-versions "$2" ge 27.11.3~; then
            rm -f /var/lib/ubuntu-advantage/preinst-detected-apt-news-disabled
            [ -f /etc/ubuntu-advantage/uaclient.conf.preinst-remove ] && mv /etc/ubuntu-advantage/uaclient.conf.preinst-remove /etc/ubuntu-advantage/uaclient.conf
        fi
        ;;
esac

# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init/ua-auto-attach.conf 20.2~ ubuntu-advantage-tools -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/cron.daily/ubuntu-advantage-tools 19.1~ ubuntu-advantage-tools -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/update-motd.d/80-livepatch 19.1~ ubuntu-advantage-tools -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/update-motd.d/80-esm 19.1~ ubuntu-advantage-tools -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/update-motd.d/99-esm 19.1~ ubuntu-advantage-tools -- "$@"
# End automatically added section
# Automatically added by dh_systemd_start/13.6ubuntu1
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_start/13.6ubuntu1
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable/13.6ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'ubuntu-advantage.service' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ubuntu-advantage.service' >/dev/null || true
		deb-systemd-helper unmask 'ubuntu-advantage.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_systemd_enable/13.6ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'ua-timer.timer' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ua-timer.timer' >/dev/null || true
		deb-systemd-helper unmask 'ua-timer.timer' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_systemd_enable/13.6ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'ua-reboot-cmds.service' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ua-reboot-cmds.service' >/dev/null || true
		deb-systemd-helper unmask 'ua-reboot-cmds.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installdebconf/13.6ubuntu1
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	db_purge
fi
# End automatically added section


exit 0