api2/node/../disks/directory: added DELETE endpoint for removal of mount-units
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
87c4cb7419
commit
be614c625f
@ -83,6 +83,17 @@ pub fn reload_daemon() -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn disable_unit(unit: &str) -> Result<(), Error> {
|
||||
|
||||
let mut command = std::process::Command::new("systemctl");
|
||||
command.arg("disable");
|
||||
command.arg(unit);
|
||||
|
||||
crate::tools::run_command(command, None)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn enable_unit(unit: &str) -> Result<(), Error> {
|
||||
|
||||
let mut command = std::process::Command::new("systemctl");
|
||||
|
Reference in New Issue
Block a user