8 breaking releases
new 0.9.0 | Nov 6, 2024 |
---|---|
0.7.1 | Feb 22, 2024 |
0.6.0 | Dec 1, 2023 |
0.5.0 | Nov 27, 2023 |
0.2.0 | Jul 14, 2022 |
#354 in Unix APIs
104 downloads per month
71KB
1.5K
SLoC
Contains (ELF exe/lib, 18KB) test-aux/setuid
systemd_run
This is the crate for running processes as Systemd transient services.
Status: Highly unstable, at early development cycle.
Example code
This code starts /bin/true
as a Systemd transient service, running in
the per-user service manager of your login session, and wait for it to
finish.
#[async_std::main]
async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
let status = systemd_run::RunUser::new("/bin/true")
.start()
.await?
.wait()
.await?;
dbg!(status);
Ok(())
}
Dependencies
~9–19MB
~284K SLoC