#!/bin/sh

set -e

case "$1" in
	purge)
		rm -r /etc/vlmcsd
		userdel -rf vlmcsd
		;;
	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
		exit 0
		;;
	*)
		echo "postrm called with unknown argument \`$1'" >&2
		exit 0
		;;
esac

# Automatically added by dh_installinit/12.1.1
if [ "$1" = "purge" ] ; then
	update-rc.d vlmcsd remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_systemd_enable/12.1.1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'vlmcsd.service' >/dev/null || true
	fi
fi

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


exit 0
