HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/ec2-instance-connect.postrm
#!/bin/sh

set -e

# 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 'ec2-instance-connect.service' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'ec2-instance-connect.service' >/dev/null || true
		deb-systemd-helper unmask 'ec2-instance-connect.service' >/dev/null || true
	fi
fi
# End automatically added section


case "$1" in
    purge|remove|abort-install|disappear)
        deb-systemd-helper purge ec2-instance-connect
        # Delete system user
        deluser --system --quiet ec2-instance-connect
        echo "Deleted system user ec2-instance-connect"

        # restart ssh since the drop-in disappeared
        deb-systemd-invoke restart ssh.service
    ;;
    *)
        exit 0
    ;;
esac