Current File : /var/lib/dpkg/info/memcached.postrm
#!/bin/sh

set -e

USER=memcache
GROUP=memcache

if [ "$1" = "purge" ]
	then
		rm -f /etc/memcached.conf
		rm -f /var/log/memcached.log

        deluser --system $USER || true
        delgroup --system --only-if-empty $GROUP || true
fi

	rm -f /var/run/memcached.pid

# Automatically added by dh_installinit/13.14.1ubuntu5
if [ "$1" = "remove" ] && [ -x "/etc/init.d/memcached" ] ; then
	chmod -x "/etc/init.d/memcached" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d memcached remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'memcached.service' >/dev/null || true
	fi
fi
# End automatically added section