rustica-agent-cli doens't clean-up its socket on exit, if fixed, and fails on next start
Opened this issue · 1 comments
andrevmatos commented
When specifying a constant socket path to rustica-agent-cli
, either through socket =
in environment file or --socket
service option, it creates on first start, but doesn't rm on exit/termination, and next start fails with:
thread 'main' panicked at /build/source/rustica-agent/src/sshagent/agent.rs:38:56:
called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Workaround for now is to rm
the socket explicitly before starting the service again.
andrevmatos commented
Just as a side-note: it'd be nice if, instead of e.g. simply removing the existing socket, the app could bind to it directly
Rationale: systemd socket activation creates the specified socket path, and listens to it; when anyone tries to attach to that socket, it buffers its io, activates the specified service (on demand) and gives control to it.
This would allow rustica-agent to not be started until requested.