api: service command: fix test for essential service
makes no sense to disallow reload or start (even if start cannot really happen) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3da9b7e0dd
commit
ee15af6bb8
|
@ -190,8 +190,8 @@ fn run_service_command(service: &str, cmd: &str) -> Result<Value, Error> {
|
||||||
_ => bail!("unknown service command '{}'", cmd),
|
_ => bail!("unknown service command '{}'", cmd),
|
||||||
}
|
}
|
||||||
|
|
||||||
if service == "proxmox-backup" && cmd != "restart" {
|
if service == "proxmox-backup" && cmd == "stop" {
|
||||||
bail!("invalid service cmd '{} {}'", service, cmd);
|
bail!("invalid service cmd '{} {}' cannot stop essential service!", service, cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
let real_service_name = real_service_name(service);
|
let real_service_name = real_service_name(service);
|
||||||
|
|
Loading…
Reference in New Issue