#!/bin/sh
set -e
if [ "$1" = "remove" ]; then
    userdel dvmhost || true
    groupdel dvmhost || true

    if [ -x "/usr/bin/deb-systemd-helper" ]; then
        deb-systemd-helper mask 'dvmhost.service' >/dev/null || true
    fi
fi

if [ "$1" = "purge" ]; then
    userdel dvmhost || true
    groupdel dvmhost || true

    if [ -x "/usr/bin/deb-systemd-helper" ]; then
        deb-systemd-helper purge 'dvmhost.service' >/dev/null || true
        deb-systemd-helper unmask 'dvmhost.service' >/dev/null || true
    fi
fi
