mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
wrolpi-app crash-loops with 203/EXEC when /usr/local/bin/serve is missing. Two independent causes, both fixed here: 1. The `single-file --version ||` guard in the install scripts only installed serve (and readability) when single-file was ABSENT. On a machine that already has single-file (a prior install or a baked image), serve was skipped, and re-running install.sh could never repair it. Install each npm global independently based on its own presence. 2. The service hardcoded /usr/local/bin/serve, which breaks when npm's global prefix puts serve in /usr/bin (depends on how node was installed). Resolve serve via PATH with `/usr/bin/env serve`. Verified on a fresh Raspberry Pi OS Trixie install (10.0.0.8): wrolpi-app is active with 0 restarts and serves 200 with the PATH-resolved ExecStart. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
545 B
Desktop File
19 lines
545 B
Desktop File
[Unit]
|
|
Description=WROLPi React APP
|
|
Wants=wrolpi-api.service
|
|
PartOf=wrolpi.target
|
|
Conflicts=wrolpi-app-dev.service
|
|
|
|
[Service]
|
|
# Use explicit `serve.json` so `epub.html` is not lost.
|
|
# Resolve `serve` via PATH so it works regardless of npm's global prefix
|
|
# (/usr/local/bin vs /usr/bin depending on how node was installed).
|
|
ExecStart=/usr/bin/env serve build -l 3000 -c /opt/wrolpi/app/serve.json
|
|
Group=wrolpi
|
|
User=wrolpi
|
|
WorkingDirectory=/opt/wrolpi/app/
|
|
# Below the API so that Sanic worker can start.
|
|
Nice=6
|
|
|
|
[Install]
|
|
WantedBy=default.target
|