From 33e74e4e7bb01723e7e06555a7fb4b1477efe67a Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Tue, 6 Feb 2024 21:26:26 +0100 Subject: [PATCH] Entrypoint script is not needed anymore --- Dockerfile | 1 - entrypoint.sh | 26 -------------------------- 2 files changed, 27 deletions(-) delete mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index b85440f3..6d0be0d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,5 @@ WORKDIR /root RUN apk add --no-cache ca-certificates COPY --from=builder /app/cmd/backup/backup /usr/bin/backup -COPY --chmod=755 ./entrypoint.sh /root/ ENTRYPOINT ["/usr/bin/backup", "-foreground"] diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index edbf6c9a..00000000 --- a/entrypoint.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Copyright 2021 - Offen Authors -# SPDX-License-Identifier: MPL-2.0 - -set -e - -if [ ! -d "/etc/dockervolumebackup/conf.d" ]; then - BACKUP_CRON_EXPRESSION="${BACKUP_CRON_EXPRESSION:-@daily}" - - echo "Installing cron.d entry with expression $BACKUP_CRON_EXPRESSION." - echo "$BACKUP_CRON_EXPRESSION backup 2>&1" | crontab - -else - echo "/etc/dockervolumebackup/conf.d was found, using configuration files from this directory." - - crontab -r && crontab /dev/null - for file in /etc/dockervolumebackup/conf.d/*; do - source $file - BACKUP_CRON_EXPRESSION="${BACKUP_CRON_EXPRESSION:-@daily}" - echo "Appending cron.d entry with expression $BACKUP_CRON_EXPRESSION and configuration file $file" - (crontab -l; echo "$BACKUP_CRON_EXPRESSION /bin/sh -c 'set -a; source $file; set +a && backup' 2>&1") | crontab - - done -fi - -echo "Starting cron in foreground." -crond -f -d 8