Files
terraria-server-manager/packaging/deb/postrm
T
2026-09-28 16:52:30 +00:00

26 lines
642 B
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
purge)
# Forget which instances were enabled at boot
rm -f /etc/systemd/system/multi-user.target.wants/terraria@*.service
rm -rf /etc/systemd/system/terraria@.service.d
cat >&2 <<MSG
terraria-server-manager purged. Worlds and instances in /var/lib/terraria and the
'terraria' user were kept. Remove them manually if they are no longer needed:
sudo rm -rf /var/lib/terraria && sudo userdel terraria
MSG
;;
esac
case "$1" in
remove|purge)
if [ -d /run/systemd/system ]; then
systemctl daemon-reload || true
fi
;;
esac
exit 0