server: fleet-backup.sh — correct litestream asset name, restart on re-run (#643)
Two fixes from the first live run: the release tarball is linux-x86_64 (not -amd64), and 'enable --now' is a no-op when the service is already running, so a re-run after add-instance regenerated the config but never loaded it — restart explicitly.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+3
−2
deploy/fleet-backup.sh+3 −2
diff --git a/deploy/fleet-backup.sh b/deploy/fleet-backup.sh| index fefadff..caf13a8 100755 |
| --- a/deploy/fleet-backup.sh |
| +++ b/deploy/fleet-backup.sh |
| @@ -38,7 +38,7 @@ UNIT=/etc/systemd/system/lchat-litestream.service |
| # 1. The binary (skip when the right version is already installed). |
| if ! "$BIN" version 2>/dev/null | grep -q "$LITESTREAM_VERSION"; then |
| echo "installing litestream v$LITESTREAM_VERSION" |
| - curl -fsSL "https://github.com/benbjohnson/litestream/releases/download/v${LITESTREAM_VERSION}/litestream-${LITESTREAM_VERSION}-linux-amd64.tar.gz" \ |
| + curl -fsSL "https://github.com/benbjohnson/litestream/releases/download/v${LITESTREAM_VERSION}/litestream-${LITESTREAM_VERSION}-linux-x86_64.tar.gz" \ |
| | tar -xzO litestream > "$BIN.tmp" |
| chmod 0755 "$BIN.tmp" && mv "$BIN.tmp" "$BIN" |
| fi |
| @@ -93,6 +93,7 @@ WantedBy=multi-user.target |
| EOF |
| systemctl daemon-reload |
| -systemctl enable --now lchat-litestream |
| +systemctl enable lchat-litestream |
| +systemctl restart lchat-litestream |
| systemctl --no-pager --lines=0 status lchat-litestream || true |
| echo "done — verify with: journalctl -u lchat-litestream -n 20" |