Repository navigation
feat(release): removing the .deb stops the background service - #104
Merged
Merged
Conversation
A prerm script does what the NSIS uninstall hook does on Windows: on remove or purge, and not on the upgrades the in-app updater installs, it runs botloftd service uninstall as each user who has the service and removes the service and sign-in entries. Bots and data stay.
httpsphl
enabled auto-merge
October 2, 2026 02:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the other Linux gap (spec 15.4): removing the
.debnow stops Botloft's background service, as the NSIS uninstall hook does on Windows.app/src-tauri/linux/prerm.shis wired as the.deb'spreRemoveScript. dpkg runs it as root; it acts only onremoveorpurge. The in-app updater installs a new.deb, which calls it withupgrade, and that leaves everything alone.~/.config/systemd/user/botloft.servicein/home/*and/root:botloftd --home ~/.local/share/Botloft service uninstallas that user (runuser, withHOME,XDG_RUNTIME_DIRand their session bus).default.target.wantslink and~/.config/autostart/botloft.desktop, which covers users who are signed out.Tests
botloftdthat records its call:upgradechanges nothing.removecalls ana's daemon as ana, with her home, runtime dir and data folder; bob has no session and only loses the files..debcarriesprerm, mode 0755.Manual test (not done yet)
On Ubuntu: install the
.deb, open Botloft, thensudo apt remove botloft.systemctl --user status botloftshould no longer find the unit, and nobotloftdshould run.