diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ae064a1..2f22526 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -307,7 +307,7 @@ jobs: run: | docker run -d --name test-versions -e CRON=false ${{ env.IMAGE }} timeout 30 bash -c \ - 'until docker logs test-versions 2>&1 | grep -q "borgmatic"; do sleep 1; done' + 'until docker logs test-versions 2>&1 | grep -q "Time Zone:"; do sleep 1; done' logs=$(docker logs test-versions 2>&1) echo "$logs" echo "$logs" | grep -qE "borg [0-9]" || { echo "borg version missing"; exit 1; } diff --git a/CHANGELOG.md b/CHANGELOG.md index e31a342..db94b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 2026-06-27 (continued 8) + +### Added + +- Warning when borgmatic is run directly via `docker exec` instead of through `borgmatic-start`. Running directly bypasses the SIGTERM/INT/HUP signal forwarding that `borgmatic-start` provides, which can leave a backup mid-run if the container is stopped. The warning is suppressed when called via `borgmatic-start`. + ## 2026-06-27 (continued 7) ### Changed diff --git a/Dockerfile b/Dockerfile index 6d85f28..5b2d721 100755 --- a/Dockerfile +++ b/Dockerfile @@ -72,12 +72,14 @@ EOF COPY --link requirements.txt / +# hadolint ignore=DL3013,DL3018,DL3042 RUN --mount=type=cache,id=pip,target=/root/.cache,sharing=locked \ <&2 +fi +exec /usr/local/bin/borgmatic.bin "$@" diff --git a/root/usr/local/bin/borgmatic-start b/root/usr/local/bin/borgmatic-start index 3fff03b..91301f8 100644 --- a/root/usr/local/bin/borgmatic-start +++ b/root/usr/local/bin/borgmatic-start @@ -2,6 +2,6 @@ trap 'echo "[borgmatic] Caught signal, forwarding to borgmatic (PID $borgmatic_pid)..."; kill -TERM $borgmatic_pid 2>/dev/null' TERM INT HUP -borgmatic "$@" & +BORGMATIC_VIA_START=1 borgmatic "$@" & borgmatic_pid=$! wait $borgmatic_pid