#!/bin/sh
set -e

# purge removes the service state (store, certs, one-time passwords) —
# but NEVER the ZFS pool or application datasets. Applications and
# their data are the operator's, not the package's.
case "$1" in
  purge)
    rm -rf /var/lib/proxdock
    rm -f /etc/proxdock/config.yml
    rmdir /etc/proxdock 2>/dev/null || true
    ;;
esac

systemctl daemon-reload >/dev/null 2>&1 || true

exit 0
