arisa 2.2.3 → 2.2.5
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 +8 -18
- package/package.json +1 -1
package/bin/arisa.js
CHANGED
|
@@ -465,7 +465,7 @@ function provisionArisaUser() {
|
|
|
465
465
|
spawnSync("usermod", ["-aG", group, "arisa"], { stdio: "ignore" });
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
// 2. Install bun (
|
|
468
|
+
// 2. Install bun (curl, not bun — low memory footprint)
|
|
469
469
|
process.stdout.write(" Installing bun (this may take a minute)...\n");
|
|
470
470
|
const bunInstall = runAsInherit("curl -fsSL https://bun.sh/install | bash");
|
|
471
471
|
if (bunInstall.status !== 0) {
|
|
@@ -483,19 +483,9 @@ function provisionArisaUser() {
|
|
|
483
483
|
spawnSync("chown", ["arisa:arisa", profilePath], { stdio: "ignore" });
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
// 3.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
spawnSync("chown", ["-R", "arisa:arisa", dest], { stdio: "pipe" });
|
|
490
|
-
|
|
491
|
-
// Install deps + global
|
|
492
|
-
process.stdout.write(" Installing dependencies...\n");
|
|
493
|
-
const install = runAsInherit("cd ~/arisa && ~/.bun/bin/bun install && ~/.bun/bin/bun add -g .");
|
|
494
|
-
if (install.status !== 0) {
|
|
495
|
-
step(false, "Failed to install dependencies");
|
|
496
|
-
process.exit(1);
|
|
497
|
-
}
|
|
498
|
-
step(true, "Arisa installed for arisa");
|
|
486
|
+
// 3. Ensure pkgRoot is readable by arisa user (run from global install, no copy)
|
|
487
|
+
spawnSync("chmod", ["-R", "o+rX", pkgRoot], { stdio: "ignore" });
|
|
488
|
+
step(true, `Arisa will run from ${pkgRoot}`);
|
|
499
489
|
|
|
500
490
|
// 4. Migrate data
|
|
501
491
|
const rootArisa = "/root/.arisa";
|
|
@@ -520,11 +510,11 @@ Wants=network-online.target
|
|
|
520
510
|
[Service]
|
|
521
511
|
Type=simple
|
|
522
512
|
User=arisa
|
|
523
|
-
WorkingDirectory
|
|
524
|
-
ExecStart=/home/arisa/.bun/bin/bun
|
|
513
|
+
WorkingDirectory=${pkgRoot}
|
|
514
|
+
ExecStart=/home/arisa/.bun/bin/bun ${daemonEntry}
|
|
525
515
|
Restart=always
|
|
526
516
|
RestartSec=5
|
|
527
|
-
Environment=ARISA_PROJECT_DIR
|
|
517
|
+
Environment=ARISA_PROJECT_DIR=${pkgRoot}
|
|
528
518
|
Environment=BUN_INSTALL=/home/arisa/.bun
|
|
529
519
|
Environment=PATH=/home/arisa/.bun/bin:/usr/local/bin:/usr/bin:/bin
|
|
530
520
|
|
|
@@ -584,7 +574,7 @@ function canUseSystemdSystem() {
|
|
|
584
574
|
}
|
|
585
575
|
|
|
586
576
|
function runArisaForeground() {
|
|
587
|
-
const su = spawnSync("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && /home/arisa/.bun/bin/bun
|
|
577
|
+
const su = spawnSync("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && export ARISA_PROJECT_DIR=${pkgRoot} && /home/arisa/.bun/bin/bun ${daemonEntry}`], {
|
|
588
578
|
stdio: "inherit",
|
|
589
579
|
});
|
|
590
580
|
return su.status ?? 1;
|