From c84bdead8b77eca3672b14238f6c6df131b51149 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 17 Nov 2020 23:02:41 -0500 Subject: [PATCH] updated cron config and removed old commands --- duplicacy/config.json | 4 ++-- duplicacy/dockerfile | 3 --- duplicacy/run.sh | 13 ++----------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/duplicacy/config.json b/duplicacy/config.json index 9672ac6..0afc6e6 100644 --- a/duplicacy/config.json +++ b/duplicacy/config.json @@ -1,6 +1,6 @@ { "name": "duplicacy", - "version": "20201117.19", + "version": "20201117.20", "slug": "duplicacy", "description": "Duplicacy backup", "arch": ["armhf", "armv7"], @@ -15,7 +15,7 @@ "ssh_password": "password", "server": "server.example.com", "path": "/opt/some/folder/on/on/server", - "crontab_run": "*/5 * * * *", + "crontab_run": "0 2 * * 5", "filters": [ "i:addons/.*", "i:backup/.*", diff --git a/duplicacy/dockerfile b/duplicacy/dockerfile index 0d125b5..739d8f5 100644 --- a/duplicacy/dockerfile +++ b/duplicacy/dockerfile @@ -3,9 +3,6 @@ FROM ${BUILD_FROM} ENV LANG C.UTF-8 -# Install cron -#RUN apt -y install cron - # Copy data for add-on COPY run.sh / COPY duplicacy_linux_arm_2.7.2 /duplicacy diff --git a/duplicacy/run.sh b/duplicacy/run.sh index 66bb73e..b7fd7a4 100644 --- a/duplicacy/run.sh +++ b/duplicacy/run.sh @@ -25,16 +25,7 @@ sed --in-place 's~~'${BACKUP_SERVER_PATH}'~' /.duplicacy/pre # create the filters file echo ${FILTERS} | jq -r '.[]' >> /.duplicacy/filters - # backup all the data using cron -#echo "${CRONTAB_RUN} /duplicacy -verbose -log backup -stats" >> /etc/cron.d/duplicacy echo "${CRONTAB_RUN} /duplicacy -verbose -log backup -stats" >> /etc/crontabs/root -# Give execution rights on the cron job -#chmod 0644 /etc/crontabs/root -# Apply cron job -#crontab /etc/crontabs/root -/usr/sbin/crond -f -l 1 -# Create the log file to be able to run tail -#touch /var/log/cron.log -# Run the command on container startup -#cron && tail -f /var/log/cron.log \ No newline at end of file +# run the cron daemon in the forground +/usr/sbin/crond -f \ No newline at end of file