Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sideload-repos-systemd: Don't launch service in a tight loop
man systemd.path has the following to say: > When a service unit triggered by a path unit terminates (regardless > whether it exited successfully or failed), monitored paths are checked > immediately again, and the service accordingly restarted instantly. On my system, I observe that once /run/media/wjt is created, flatpak-sideload-usb-repo.service is invoked in a tight loop. I think what's happening is that PathExists=/run/media/wjt continues to be true, so the service keeps getting restarted. What we instead want is to activate the .service: - On login - When the media directory *changes* (because mount points beneath it appear or disappear) Remove PathExists from the .path, and instead mark the .service as WantedBy default.target so it is launched on login.
- Loading branch information