services: make reload safer and default to it in gui
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d757021f4c
commit
e6b599aa6c
@ -185,10 +185,11 @@ fn run_service_command(service: &str, cmd: &str) -> Result<Value, Error> {
|
||||
|
||||
// fixme: run background worker (fork_worker) ???
|
||||
|
||||
match cmd {
|
||||
"start"|"stop"|"restart"|"reload" => {},
|
||||
let cmd = match cmd {
|
||||
"start"|"stop"|"restart"=> cmd,
|
||||
"reload" => "try-reload-or-restart", // some services do not implement reload
|
||||
_ => bail!("unknown service command '{}'", cmd),
|
||||
}
|
||||
};
|
||||
|
||||
if service == "proxmox-backup" && cmd == "stop" {
|
||||
bail!("invalid service cmd '{} {}' cannot stop essential service!", service, cmd);
|
||||
|
@ -26,6 +26,7 @@ Ext.define('PBS.ServerAdministration', {
|
||||
xtype: 'proxmoxNodeServiceView',
|
||||
title: gettext('Services'),
|
||||
itemId: 'services',
|
||||
restartCommand: 'reload', // avoid disruptions
|
||||
startOnlyServices: {
|
||||
syslog: true,
|
||||
'proxmox-backup': true,
|
||||
|
Loading…
Reference in New Issue
Block a user