#!/bin/sh -e

NAME=fah-client

case "$1" in
  remove)
    systemctl daemon-reload || true
    ;;

  purge)
    # Disable service
    deb-systemd-helper purge $NAME.service || true

    # Remove all files
    rm -rf /etc/$NAME /var/lib/$NAME /var/log/$NAME

    # Remove user and group
    deluser  --quiet $NAME || true
    delgroup --quiet $NAME || true
    ;;
esac
