@edihasaj/recall 1.0.9 → 1.0.10
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/cli.js +11 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2572,10 +2572,19 @@ function installSystemdUnit(opts = {}) {
|
|
|
2572
2572
|
mkdirSync6(cfg.logDir, { recursive: true });
|
|
2573
2573
|
writeFileSync6(cfg.unitPath, renderUnit(cfg), { mode: 384 });
|
|
2574
2574
|
chmodSync2(cfg.unitPath, 384);
|
|
2575
|
-
|
|
2576
|
-
systemctl(["--user", "enable", "--now", `${cfg.label}.service`]);
|
|
2575
|
+
for (const args of systemdInstallCommands(cfg.label)) systemctl(args);
|
|
2577
2576
|
return getSystemdStatus(cfg.label);
|
|
2578
2577
|
}
|
|
2578
|
+
function systemdInstallCommands(label = DEFAULT_LABEL2) {
|
|
2579
|
+
const service = `${label}.service`;
|
|
2580
|
+
return [
|
|
2581
|
+
["--user", "daemon-reload"],
|
|
2582
|
+
["--user", "enable", service],
|
|
2583
|
+
// `enable --now` leaves an already-active process untouched. Restart so a
|
|
2584
|
+
// package upgrade actually runs the newly installed daemon code.
|
|
2585
|
+
["--user", "restart", service]
|
|
2586
|
+
];
|
|
2587
|
+
}
|
|
2579
2588
|
function uninstallSystemdUnit(label = DEFAULT_LABEL2) {
|
|
2580
2589
|
assertLinux();
|
|
2581
2590
|
const cfg = resolveConfig2({ label });
|