@rubytech/taskmaster 1.28.0 → 1.28.1
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/dist/build-info.json +3 -3
- package/dist/cli/provision-cli.js +24 -0
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -66,6 +66,12 @@ async function runProvision(opts) {
|
|
|
66
66
|
console.log("[5/7] Hostname: skipped (macOS)");
|
|
67
67
|
console.log("[6/7] Avahi service: skipped (macOS)");
|
|
68
68
|
}
|
|
69
|
+
// Step 6b: Log directory (Linux only) — ensure /tmp/taskmaster is world-writable
|
|
70
|
+
// on every boot via systemd-tmpfiles.d so the gateway can always write logs there
|
|
71
|
+
// regardless of which user created the directory previously.
|
|
72
|
+
if (isLinux) {
|
|
73
|
+
await setupLogDir();
|
|
74
|
+
}
|
|
69
75
|
// Step 7: Install daemon
|
|
70
76
|
console.log("[7/7] Installing gateway daemon...");
|
|
71
77
|
await runDaemonInstall({ port, force: true });
|
|
@@ -218,6 +224,24 @@ async function restartAvahi() {
|
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
226
|
// ---------------------------------------------------------------------------
|
|
227
|
+
// Step 6b: Log directory (Linux only)
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
async function setupLogDir() {
|
|
230
|
+
const tmpfileConf = "/etc/tmpfiles.d/taskmaster.conf";
|
|
231
|
+
const confLine = "d /tmp/taskmaster 1777 root root -\n";
|
|
232
|
+
console.log("[6b/7] Log directory: writing systemd-tmpfiles.d entry...");
|
|
233
|
+
try {
|
|
234
|
+
await runCommandWithTimeout(["sudo", "sh", "-c", `echo '${confLine.trim()}' > ${tmpfileConf}`], { timeoutMs: 10_000 });
|
|
235
|
+
await runCommandWithTimeout(["sudo", "systemd-tmpfiles", "--create", tmpfileConf], {
|
|
236
|
+
timeoutMs: 10_000,
|
|
237
|
+
});
|
|
238
|
+
console.log(" /tmp/taskmaster: world-writable (1777), persists across reboots");
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
console.error(` log dir setup failed: ${String(err)}`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
221
245
|
// Helpers
|
|
222
246
|
// ---------------------------------------------------------------------------
|
|
223
247
|
async function fileExists(p) {
|