diff options
| author | Adam Malczewski <[email protected]> | 2026-06-04 21:21:20 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-04 21:21:20 +0900 |
| commit | 394f1ed37ce860da6fdc385769bf29f9737105cd (patch) | |
| tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /packaging/s6 | |
| parent | 81a9cdbadf8c9d940d4fe9a2a0de607dee1f5f1a (diff) | |
| download | dispatch-394f1ed37ce860da6fdc385769bf29f9737105cd.tar.gz dispatch-394f1ed37ce860da6fdc385769bf29f9737105cd.zip | |
chore: genesis — remove all files to rebuild from scratch (arch rewrite)
Diffstat (limited to 'packaging/s6')
| -rw-r--r-- | packaging/s6/dispatch-api-log/consumer-for | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-log/notification-fd | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-log/pipeline-name | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-log/run | 6 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-log/type | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-srv/producer-for | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-srv/run | 50 | ||||
| -rw-r--r-- | packaging/s6/dispatch-api-srv/type | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-log/consumer-for | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-log/notification-fd | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-log/pipeline-name | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-log/run | 6 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-log/type | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-srv/producer-for | 1 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-srv/run | 25 | ||||
| -rw-r--r-- | packaging/s6/dispatch-frontend-srv/type | 1 |
16 files changed, 0 insertions, 99 deletions
diff --git a/packaging/s6/dispatch-api-log/consumer-for b/packaging/s6/dispatch-api-log/consumer-for deleted file mode 100644 index 8a696f4..0000000 --- a/packaging/s6/dispatch-api-log/consumer-for +++ /dev/null @@ -1 +0,0 @@ -dispatch-api-srv diff --git a/packaging/s6/dispatch-api-log/notification-fd b/packaging/s6/dispatch-api-log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/packaging/s6/dispatch-api-log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/packaging/s6/dispatch-api-log/pipeline-name b/packaging/s6/dispatch-api-log/pipeline-name deleted file mode 100644 index 9dab7e6..0000000 --- a/packaging/s6/dispatch-api-log/pipeline-name +++ /dev/null @@ -1 +0,0 @@ -dispatch-api diff --git a/packaging/s6/dispatch-api-log/run b/packaging/s6/dispatch-api-log/run deleted file mode 100644 index 5d1b821..0000000 --- a/packaging/s6/dispatch-api-log/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Logger for dispatch-api. Reads stdout from dispatch-api-srv and writes to -# /var/log/dispatch-api/ using s6-log (auto-rotation, timestamping). - -exec /usr/bin/s6-setuidgid tradam \ - /usr/bin/s6-log -b -d3 -- n10 s10000000 T /var/log/dispatch-api diff --git a/packaging/s6/dispatch-api-log/type b/packaging/s6/dispatch-api-log/type deleted file mode 100644 index 5883cff..0000000 --- a/packaging/s6/dispatch-api-log/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/packaging/s6/dispatch-api-srv/producer-for b/packaging/s6/dispatch-api-srv/producer-for deleted file mode 100644 index 88f7df2..0000000 --- a/packaging/s6/dispatch-api-srv/producer-for +++ /dev/null @@ -1 +0,0 @@ -dispatch-api-log diff --git a/packaging/s6/dispatch-api-srv/run b/packaging/s6/dispatch-api-srv/run deleted file mode 100644 index f9c3a67..0000000 --- a/packaging/s6/dispatch-api-srv/run +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# dispatch-api service — runs the Dispatch backend API as the `tradam` user. -# stdout/stderr are piped to dispatch-api-log via the s6-rc pipeline. - -DISPATCH_CONF="/etc/dispatch/dispatch-api.conf" -DISPATCH_DIR="/opt/dispatch" - -if [ -f "$DISPATCH_CONF" ]; then - set -a - . "$DISPATCH_CONF" - set +a -fi - -cd "$DISPATCH_DIR" || exit 1 - -# Merge stderr into stdout so both get logged by the consumer. -exec 2>&1 - -# Wait for the home directory to be available before starting. -# -# On the cyberdeck /home is a separate filesystem (ext4 on /dev/sda4). If this -# service starts before that mount is ready, the API runs as `tradam` with -# HOME=/home/tradam while /home/tradam does not yet exist. Creating the data -# dir (~/.local/share/dispatch) then fails with EACCES, Claude credential -# discovery silently fails, and Claude tabs fall back to an empty API key -# (401 from OpenCode Zen) for the entire lifetime of the process. Block until -# the home directory appears (capped at ~30s as a safety net). Where /home is -# part of the root filesystem this check passes immediately. -i=0 -while [ ! -d "/home/tradam" ]; do - i=$((i + 1)) - if [ "$i" -ge 30 ]; then - echo "dispatch-api: /home/tradam still missing after ${i}s — starting anyway" >&2 - break - fi - echo "dispatch-api: waiting for /home/tradam to be available (${i})..." >&2 - sleep 1 -done - -# Drop privileges to tradam and run bun. -exec /usr/bin/s6-setuidgid tradam \ - /usr/bin/env \ - HOME=/home/tradam \ - USER=tradam \ - LOGNAME=tradam \ - PATH=/usr/local/bin:/usr/bin:/bin \ - NODE_ENV="${NODE_ENV:-production}" \ - PORT="${PORT:-18390}" \ - OPENCODE_API_KEY="${OPENCODE_API_KEY:-}" \ - /usr/bin/bun packages/api/src/index.ts diff --git a/packaging/s6/dispatch-api-srv/type b/packaging/s6/dispatch-api-srv/type deleted file mode 100644 index 5883cff..0000000 --- a/packaging/s6/dispatch-api-srv/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/packaging/s6/dispatch-frontend-log/consumer-for b/packaging/s6/dispatch-frontend-log/consumer-for deleted file mode 100644 index f941d04..0000000 --- a/packaging/s6/dispatch-frontend-log/consumer-for +++ /dev/null @@ -1 +0,0 @@ -dispatch-frontend-srv diff --git a/packaging/s6/dispatch-frontend-log/notification-fd b/packaging/s6/dispatch-frontend-log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/packaging/s6/dispatch-frontend-log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/packaging/s6/dispatch-frontend-log/pipeline-name b/packaging/s6/dispatch-frontend-log/pipeline-name deleted file mode 100644 index 0ee914b..0000000 --- a/packaging/s6/dispatch-frontend-log/pipeline-name +++ /dev/null @@ -1 +0,0 @@ -dispatch-frontend diff --git a/packaging/s6/dispatch-frontend-log/run b/packaging/s6/dispatch-frontend-log/run deleted file mode 100644 index 4dda559..0000000 --- a/packaging/s6/dispatch-frontend-log/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Logger for dispatch-frontend. Reads stdout from dispatch-frontend-srv and -# writes to /var/log/dispatch-frontend/ using s6-log. - -exec /usr/bin/s6-setuidgid tradam \ - /usr/bin/s6-log -b -d3 -- n10 s10000000 T /var/log/dispatch-frontend diff --git a/packaging/s6/dispatch-frontend-log/type b/packaging/s6/dispatch-frontend-log/type deleted file mode 100644 index 5883cff..0000000 --- a/packaging/s6/dispatch-frontend-log/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/packaging/s6/dispatch-frontend-srv/producer-for b/packaging/s6/dispatch-frontend-srv/producer-for deleted file mode 100644 index c29eb09..0000000 --- a/packaging/s6/dispatch-frontend-srv/producer-for +++ /dev/null @@ -1 +0,0 @@ -dispatch-frontend-log diff --git a/packaging/s6/dispatch-frontend-srv/run b/packaging/s6/dispatch-frontend-srv/run deleted file mode 100644 index 3411476..0000000 --- a/packaging/s6/dispatch-frontend-srv/run +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# dispatch-frontend service — serves the built frontend assets as the `tradam` user. -# stdout/stderr are piped to dispatch-frontend-log via the s6-rc pipeline. - -DISPATCH_CONF="/etc/dispatch/dispatch-frontend.conf" -DISPATCH_DIR="/opt/dispatch" - -if [ -f "$DISPATCH_CONF" ]; then - set -a - . "$DISPATCH_CONF" - set +a -fi - -cd "$DISPATCH_DIR" || exit 1 - -exec 2>&1 - -exec /usr/bin/s6-setuidgid tradam \ - /usr/bin/env \ - HOME=/home/tradam \ - USER=tradam \ - LOGNAME=tradam \ - PATH=/usr/local/bin:/usr/bin:/bin \ - PORT="${PORT:-18391}" \ - /usr/bin/bun packages/frontend/serve.ts diff --git a/packaging/s6/dispatch-frontend-srv/type b/packaging/s6/dispatch-frontend-srv/type deleted file mode 100644 index 5883cff..0000000 --- a/packaging/s6/dispatch-frontend-srv/type +++ /dev/null @@ -1 +0,0 @@ -longrun |
