diff options
| author | Adam Malczewski <[email protected]> | 2026-05-29 12:23:30 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-05-29 12:23:30 +0900 |
| commit | 0954c6520878e073c7822fc4a8f4a752474f5d7a (patch) | |
| tree | b19012f89ccbb07bf3180612a6cfef7077618d6b /packaging/[email protected] | |
| parent | d6609efd4e14101e77fb35a98ce597a32816862d (diff) | |
| download | dispatch-0954c6520878e073c7822fc4a8f4a752474f5d7a.tar.gz dispatch-0954c6520878e073c7822fc4a8f4a752474f5d7a.zip | |
fix(packaging): convert dispatch-systemd from user units to system template units (User=%i)
The per-user systemd manager ([email protected]) fails to start on WSL
(kernel 6.6.87.2, microsoft/WSL#13186 — 'Failed to spawn executor:
Device or resource busy'), which breaks pacman's
30-systemd-daemon-reload-user.hook on install.
Changes:
- New [email protected] + [email protected] system
template units with User=%i (run as the named instance user)
- Remove old user-scope dispatch-api.service / dispatch-frontend.service
- Install to /usr/lib/systemd/system/ instead of .../systemd/user/
- Update PKGBUILD, .install hints, and bin/service to use
sudo systemctl dispatch-api@<user>
Diffstat (limited to 'packaging/[email protected]')
| -rw-r--r-- | packaging/[email protected] | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/packaging/[email protected] b/packaging/[email protected] new file mode 100644 index 0000000..3449fcb --- /dev/null +++ b/packaging/[email protected] @@ -0,0 +1,21 @@ +# Dispatch API — system service template. +# Runs under the system manager (PID 1) but drops privileges to the user named +# in the instance: `dispatch-api@tradam` runs as the `tradam` user. +# +# Enable/start: +# sudo systemctl enable --now dispatch-api@<user> +[Unit] +Description=Dispatch API Backend (running as %i) +After=network.target + +[Service] +Type=simple +User=%i +WorkingDirectory=/opt/dispatch +ExecStart=/usr/bin/bun packages/api/src/index.ts +EnvironmentFile=-/etc/dispatch/dispatch-api.conf +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target |
