summaryrefslogtreecommitdiffhomepage
path: root/bin/install
AgeCommit message (Collapse)Author
3 daysfix(install): restart service instead of start (no-op when already running)devAdam Malczewski
3 daysfix(install): run build as user, sudo only on privileged linesAdam Malczewski
The script previously required sudo for the entire script (id -u check), which meant bin/build ran as root and created root-owned dist/ files. On the next build, the normal user couldn't overwrite them (EACCES). Now the script runs without a sudo prefix: the build step runs as the normal user (dist/ files are user-owned), and sudo is used only on the specific lines that write to system directories (/usr/bin, /etc, /usr/share) or call systemctl.
8 daysfix(install): write service file directly instead of sed (slashes broke it)Adam Malczewski
The sed substitution failed because the comment line contained '/' chars. Now writes the service file via heredoc with User=/Group= patched in. Also removes any previous masked service file first.
8 daysfeat(install): run dispatch service as user, not rootAdam Malczewski
systemd service: User= and Group= patched by bin/install from SUDO_USER. bin/setup-env: chowns data dirs to the real user. Since the service runs as the user, os.homedir() resolves correctly for skills discovery — no separate HOME env var needed.
8 daysfeat: standalone build + systemd install (Arch Linux)Adam Malczewski
bin/build: compiles standalone binaries (dispatch-server + dispatch CLI) via bun build --compile, builds the frontend static bundle with VITE_HTTP_PORT=24991 + VITE_WS_PORT=24990, copies to dist/web/. bin/install: installs binaries to /usr/bin/, frontend to /usr/share/dispatch/web/, systemd service to /etc/systemd/system/, config to /etc/dispatch/env, data dirs to /var/lib/dispatch/ + /var/log/dispatch/. Enables + starts the dispatch systemd service. Supports --uninstall and --no-build flags. systemd/dispatch.service: Type=simple, reads /etc/dispatch/env, restarts on failure, logs to journald. systemd/dispatch.env: template config (ports 24991 HTTP + 24990 WS, DISPATCH_WEB_DIR, API key, data paths). transport-http: optional webDir static file serving — unmatched GET requests fall through to Bun.file() serving with SPA index.html fallback. Gated on DISPATCH_WEB_DIR env var (backward compatible).