Unload the service on uninstall

This commit is contained in:
Jack Kingsman
2026-04-10 10:48:38 -07:00
parent fd26576e0d
commit 2393dadf1b

View File

@@ -18,3 +18,18 @@ post_upgrade() {
fi
fi
}
pre_remove() {
if [ -d /run/systemd/system ] && command -v systemctl &>/dev/null; then
systemctl disable --now remoteterm-meshcore 2>/dev/null || true
fi
}
post_remove() {
if [ -d /run/systemd/system ] && command -v systemctl &>/dev/null; then
systemctl daemon-reload
fi
echo "==> Database and config remain in /var/lib/remoteterm-meshcore/, remoteterm user retained."
echo "==> To fully clean up: sudo rm -rf /var/lib/remoteterm-meshcore"
}