mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-08 06:15:02 +02:00
Halt and unload the service on cleanup
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user