postrm 764 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. set -e
  3. case "$1" in
  4. purge)
  5. # Remove runtime data and configuration
  6. rm -rf /var/log/squidstats
  7. rm -rf /var/lib/squidstats
  8. rm -rf /etc/squidstats
  9. # Remove package-created app .env if present
  10. rm -f /opt/SquidStats/app/.env
  11. # Remove dedicated system user and group
  12. if getent passwd squidstats > /dev/null 2>&1; then
  13. deluser --system squidstats 2>/dev/null || true
  14. fi
  15. if getent group squidstats > /dev/null 2>&1; then
  16. delgroup --system squidstats 2>/dev/null || true
  17. fi
  18. ;;
  19. remove)
  20. if [ -d /run/systemd/system ]; then
  21. systemctl daemon-reload 2>/dev/null || true
  22. fi
  23. ;;
  24. esac
  25. #DEBHELPER#
  26. exit 0