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) ???
|
// fixme: run background worker (fork_worker) ???
|
||||||
|
|
||||||
match cmd {
|
let cmd = match cmd {
|
||||||
"start"|"stop"|"restart"|"reload" => {},
|
"start"|"stop"|"restart"=> cmd,
|
||||||
|
"reload" => "try-reload-or-restart", // some services do not implement reload
|
||||||
_ => bail!("unknown service command '{}'", cmd),
|
_ => bail!("unknown service command '{}'", cmd),
|
||||||
}
|
};
|
||||||
|
|
||||||
if service == "proxmox-backup" && cmd == "stop" {
|
if service == "proxmox-backup" && cmd == "stop" {
|
||||||
bail!("invalid service cmd '{} {}' cannot stop essential service!", service, cmd);
|
bail!("invalid service cmd '{} {}' cannot stop essential service!", service, cmd);
|
||||||
|
@ -26,6 +26,7 @@ Ext.define('PBS.ServerAdministration', {
|
|||||||
xtype: 'proxmoxNodeServiceView',
|
xtype: 'proxmoxNodeServiceView',
|
||||||
title: gettext('Services'),
|
title: gettext('Services'),
|
||||||
itemId: 'services',
|
itemId: 'services',
|
||||||
|
restartCommand: 'reload', // avoid disruptions
|
||||||
startOnlyServices: {
|
startOnlyServices: {
|
||||||
syslog: true,
|
syslog: true,
|
||||||
'proxmox-backup': true,
|
'proxmox-backup': true,
|
||||||
|
Loading…
Reference in New Issue
Block a user