src/api2/node/services.rs: add proxmox-backup-proxy service

This commit is contained in:
Dietmar Maurer 2019-04-15 09:48:02 +02:00
parent 75bc49bed7
commit 1a6c9415ae
1 changed files with 8 additions and 2 deletions

View File

@ -8,8 +8,9 @@ use serde_json::{json, Value};
use std::sync::Arc; use std::sync::Arc;
use std::process::{Command, Stdio}; use std::process::{Command, Stdio};
static SERVICE_NAME_LIST: [&str; 6] = [ static SERVICE_NAME_LIST: [&str; 7] = [
"proxmox-backup", "proxmox-backup",
"proxmox-backup-proxy",
"sshd", "sshd",
"syslog", "syslog",
"cron", "cron",
@ -192,8 +193,13 @@ fn restart_service(
log::info!("re-starting service {}", service); log::info!("re-starting service {}", service);
if service == "proxmox-backup-proxy" {
// special case, avoid aborting running tasks
run_service_command(service, "reload")
} else {
run_service_command(service, "restart") run_service_command(service, "restart")
} }
}
fn reload_service( fn reload_service(
param: Value, param: Value,