summaryrefslogtreecommitdiffhomepage
path: root/packaging/[email protected]
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-05-29 12:23:30 +0900
committerAdam Malczewski <[email protected]>2026-05-29 12:23:30 +0900
commit0954c6520878e073c7822fc4a8f4a752474f5d7a (patch)
treeb19012f89ccbb07bf3180612a6cfef7077618d6b /packaging/[email protected]
parentd6609efd4e14101e77fb35a98ce597a32816862d (diff)
downloaddispatch-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]22
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging/[email protected] b/packaging/[email protected]
new file mode 100644
index 0000000..6f35cc1
--- /dev/null
+++ b/packaging/[email protected]
@@ -0,0 +1,22 @@
+# Dispatch Frontend — system service template.
+# Runs under the system manager (PID 1) but drops privileges to the user named
+# in the instance: `dispatch-frontend@tradam` runs as the `tradam` user.
+# Tied to the matching API instance for the same user.
+#
+# Enable/start:
+# sudo systemctl enable --now dispatch-frontend@<user>
+[Unit]
+Description=Dispatch Frontend (static file server, running as %i)
+After=dispatch-api@%i.service
+
+[Service]
+Type=simple
+User=%i
+WorkingDirectory=/opt/dispatch
+ExecStart=/usr/bin/bun packages/frontend/serve.ts
+EnvironmentFile=-/etc/dispatch/dispatch-frontend.conf
+Restart=on-failure
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target