forked from lix-project/lix-installer
Use systemctl disable not enable, don't auto revert in no-confirm
This commit is contained in:
parent
fb4d1c7280
commit
6ef10ff50e
|
@ -90,7 +90,11 @@ impl Action for StartSystemdUnit {
|
|||
tracing::debug!("Stopping systemd unit");
|
||||
|
||||
// TODO(@Hoverbear): Handle proxy vars
|
||||
execute_command(Command::new("systemctl").arg("stop").arg(format!("{unit}")))
|
||||
execute_command(
|
||||
Command::new("systemctl")
|
||||
.arg("disable")
|
||||
.arg(format!("{unit}")),
|
||||
)
|
||||
.await
|
||||
.map_err(|e| StartSystemdUnitError::Command(e).boxed())?;
|
||||
|
||||
|
|
|
@ -65,8 +65,10 @@ impl CommandExecute for Install {
|
|||
if !interaction::confirm(plan.describe_revert(explain)).await? {
|
||||
interaction::clean_exit_with_message("Okay, didn't do anything! Bye!").await;
|
||||
}
|
||||
}
|
||||
plan.revert().await?
|
||||
} else {
|
||||
return Err(err).wrap_err("Install failure");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(ExitCode::SUCCESS)
|
||||
|
|
Loading…
Reference in a new issue