Struct systemd_run::Identity
source · pub struct Identity(_);Expand description
The identity for running a transient service on the system service manager.
Implementations§
source§impl Identity
impl Identity
sourcepub fn user_group<U: AsRef<str>, G: AsRef<str>>(u: U, g: G) -> Self
pub fn user_group<U: AsRef<str>, G: AsRef<str>>(u: U, g: G) -> Self
Run the transient service as the the UNIX user x and group y
for UserGroup(x, y).
You need to be the root user to start a transient service with
this. Read User= and Group= in
systemd.exec(5) for details.
sourcepub fn dynamic() -> Self
pub fn dynamic() -> Self
Run the transient service as a UNIX user and group pair dynamically allocated.
This is unavailable if the feature systemd_231 is disabled.
You need to be the root user to start a transient service with
this. Read DynamicUser= in
systemd.exec(5) for details.