Files
p2pool/debian/postrm
Wang Defa ae710732aa
Some checks failed
Build and Release / build-and-test (amd64, ubuntu) (push) Failing after 19m29s
Build and Release / build-and-test (amd64, alpine) (push) Failing after 19m31s
Build and Release / build-and-test (arm64, ubuntu) (push) Failing after 50m10s
Build and Release / release (push) Has been cancelled
Build and Release / build-and-test (arm64, alpine) (push) Has been cancelled
第一次提交
2025-12-08 10:11:41 +08:00

35 lines
729 B
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
purge)
# Remove user and group
if getent passwd p2pool >/dev/null; then
deluser --system p2pool 2>/dev/null || true
fi
if getent group p2pool >/dev/null; then
delgroup --system p2pool 2>/dev/null || true
fi
# Remove data directories (only on purge)
rm -rf /var/lib/p2pool
rm -rf /var/log/p2pool
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
# Do nothing
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Reload systemd
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
fi
exit 0