mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-06 23:47:10 +08:00
Add an ability to enable/disable nscd (#3652)
This commit is contained in:
@@ -1194,6 +1194,7 @@ let needSetup = false;
|
||||
}
|
||||
|
||||
const previousChromeExecutable = await Settings.get("chromeExecutable");
|
||||
const previousNSCDStatus = await Settings.get("nscd");
|
||||
|
||||
await setSettings("general", data);
|
||||
server.entryPage = data.entryPage;
|
||||
@@ -1211,6 +1212,15 @@ let needSetup = false;
|
||||
await resetChrome();
|
||||
}
|
||||
|
||||
// Update nscd status
|
||||
if (previousNSCDStatus !== data.nscd) {
|
||||
if (data.nscd) {
|
||||
server.startNSCDServices();
|
||||
} else {
|
||||
server.stopNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Saved"
|
||||
|
Reference in New Issue
Block a user