Halt and unload the service on cleanup

This commit is contained in:
Jack Kingsman
2026-04-10 10:36:06 -07:00
parent 416dffaca0
commit 33a7c027c2
+15
View File
@@ -27,3 +27,18 @@ post_upgrade() {
fi
fi
}
pre_remove() {
if command -v systemctl &>/dev/null && systemctl --version &>/dev/null 2>&1; then
systemctl disable --now remoteterm-meshcore 2>/dev/null || true
fi
}
post_remove() {
if command -v systemctl &>/dev/null && systemctl --version &>/dev/null 2>&1; 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"
}