Merge pull request #205 from borgmatic-collective/grantbevis/additional-supercronic-flags

Add ability to set $SUPERCRONIC_EXTRA_FLAGS
pull/208/head
Grant Bevis 2023-02-05 13:07:22 +00:00 zatwierdzone przez GitHub
commit 368ef1515a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
# syntax = docker/dockerfile:latest
FROM golang:1.19.5-alpine3.17 AS gobuilder
FROM golang:1.20.0-alpine3.17 AS gobuilder
ARG SUPERCRONIC_VERSION="v0.2.1"
RUN apk add --no-cache git
RUN go install github.com/aptible/supercronic@"${SUPERCRONIC_VERSION}"

Wyświetl plik

@ -14,4 +14,10 @@ echo apprise $apprisever
supercronic -test /etc/borgmatic.d/crontab.txt || exit 1
# Start supercronic
supercronic /etc/borgmatic.d/crontab.txt
if [ -n "${SUPERCRONIC_EXTRA_FLAGS}" ]; then
echo "The variable SUPERCRONIC_EXTRA_FLAGS is not empty, using extra flags"
supercronic $SUPERCRONIC_EXTRA_FLAGS /etc/borgmatic.d/crontab.txt
else
echo "The variable SUPERCRONIC_EXTRA_FLAGS is empty, starting normally"
supercronic /etc/borgmatic.d/crontab.txt
fi