clay-server 2.11.0-beta.25 → 2.11.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/daemon.js +14 -0
- package/package.json +1 -1
package/lib/daemon.js
CHANGED
|
@@ -38,6 +38,20 @@ try {
|
|
|
38
38
|
process.exit(1);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// --- OS users mode: check required system dependencies ---
|
|
42
|
+
if (config.osUsers) {
|
|
43
|
+
var { execSync: checkExec } = require("child_process");
|
|
44
|
+
var missing = [];
|
|
45
|
+
try { checkExec("which setfacl", { stdio: "ignore" }); } catch (e) { missing.push("acl (setfacl)"); }
|
|
46
|
+
try { checkExec("which git", { stdio: "ignore" }); } catch (e) { missing.push("git"); }
|
|
47
|
+
try { checkExec("which useradd", { stdio: "ignore" }); } catch (e) { missing.push("useradd"); }
|
|
48
|
+
if (missing.length > 0) {
|
|
49
|
+
console.error("[daemon] OS users mode requires missing system packages: " + missing.join(", "));
|
|
50
|
+
console.error("[daemon] Install with: sudo apt install " + missing.map(function (m) { return m.split(" ")[0]; }).join(" "));
|
|
51
|
+
process.exit(78); // EX_CONFIG
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
// --- TLS ---
|
|
42
56
|
var tlsOptions = null;
|
|
43
57
|
if (config.tls) {
|