Skip to content

xdu-icpc/rust-systemd-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(())
}

About

A Rust crate for running processes as Systemd transient services.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published