Add an ability to enable/disable nscd (#3652)

This commit is contained in:
Louis Lam
2023-08-28 16:15:48 +08:00
committed by GitHub
parent 0c40f02584
commit cd79df07e1
7 changed files with 69 additions and 6 deletions

View File

@@ -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"