arisa 2.2.8 → 2.2.9
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/bin/arisa.js +7 -11
- package/package.json +1 -1
package/bin/arisa.js
CHANGED
|
@@ -580,14 +580,10 @@ function canUseSystemdSystem() {
|
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
function runArisaForeground() {
|
|
583
|
-
|
|
584
|
-
// On 1GB VPS, two bun processes trigger OOM.
|
|
585
|
-
const child = spawn("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && export ARISA_PROJECT_DIR=${SHARED_ARISA_ROOT} && exec /home/arisa/.bun/bin/bun ${sharedDaemonEntry}`], {
|
|
583
|
+
const result = spawnSync("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && export ARISA_PROJECT_DIR=${SHARED_ARISA_ROOT} && exec /home/arisa/.bun/bin/bun ${sharedDaemonEntry}`], {
|
|
586
584
|
stdio: "inherit",
|
|
587
|
-
detached: true,
|
|
588
585
|
});
|
|
589
|
-
|
|
590
|
-
process.exit(0);
|
|
586
|
+
return result.status ?? 1;
|
|
591
587
|
}
|
|
592
588
|
|
|
593
589
|
// ── Root guard ──────────────────────────────────────────────────────
|
|
@@ -603,7 +599,7 @@ if (isRoot()) {
|
|
|
603
599
|
}
|
|
604
600
|
|
|
605
601
|
process.stdout.write("\nStarting interactive setup as user arisa...\n\n");
|
|
606
|
-
runArisaForeground();
|
|
602
|
+
process.exit(runArisaForeground());
|
|
607
603
|
}
|
|
608
604
|
|
|
609
605
|
// Already provisioned — route commands
|
|
@@ -622,7 +618,7 @@ if (isRoot()) {
|
|
|
622
618
|
if (isDefaultInvocation) {
|
|
623
619
|
if (!isArisaConfigured()) {
|
|
624
620
|
process.stdout.write("Arisa is not configured yet. Starting interactive setup...\n\n");
|
|
625
|
-
runArisaForeground();
|
|
621
|
+
process.exit(runArisaForeground());
|
|
626
622
|
}
|
|
627
623
|
if (hasSystemd) {
|
|
628
624
|
if (isSystemdActive()) {
|
|
@@ -632,13 +628,13 @@ if (isRoot()) {
|
|
|
632
628
|
}
|
|
633
629
|
}
|
|
634
630
|
// No systemd → foreground
|
|
635
|
-
runArisaForeground();
|
|
631
|
+
process.exit(runArisaForeground());
|
|
636
632
|
}
|
|
637
633
|
|
|
638
634
|
switch (command) {
|
|
639
635
|
case "start":
|
|
640
636
|
if (hasSystemd) process.exit(startSystemdSystem());
|
|
641
|
-
runArisaForeground();
|
|
637
|
+
process.exit(runArisaForeground());
|
|
642
638
|
break;
|
|
643
639
|
case "stop":
|
|
644
640
|
if (hasSystemd) process.exit(stopSystemdSystem());
|
|
@@ -657,7 +653,7 @@ if (isRoot()) {
|
|
|
657
653
|
break;
|
|
658
654
|
case "daemon":
|
|
659
655
|
case "run":
|
|
660
|
-
runArisaForeground();
|
|
656
|
+
process.exit(runArisaForeground());
|
|
661
657
|
default:
|
|
662
658
|
process.stderr.write(`Unknown command: ${command}\n\n`);
|
|
663
659
|
printHelp();
|