From dc42418bf7f6b7f5522e25372955b7d61babaef4 Mon Sep 17 00:00:00 2001 From: Silthus Date: Mon, 16 Nov 2020 12:46:16 +0100 Subject: [PATCH] feat: move rcb cleanup to cron --- src/backup.sh | 4 +--- src/crontab | 2 +- src/restic_compose_backup/config.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backup.sh b/src/backup.sh index e0886e7..a8423e9 100644 --- a/src/backup.sh +++ b/src/backup.sh @@ -155,6 +155,4 @@ if retry 5 10s rcon-cli save-off; then else log ERROR "Unable to turn saving off. Is the server running?" exit 1 -fi - -rcb cleanup \ No newline at end of file +fi \ No newline at end of file diff --git a/src/crontab b/src/crontab index 29a9bc9..ded9510 100644 --- a/src/crontab +++ b/src/crontab @@ -1,2 +1,2 @@ -10 2 * * * source /env.sh && /backup.sh > /proc/1/fd/1 +10 2 * * * source /env.sh && /backup.sh && rcb cleanup > /proc/1/fd/1 diff --git a/src/restic_compose_backup/config.py b/src/restic_compose_backup/config.py index 1f484be..2229092 100644 --- a/src/restic_compose_backup/config.py +++ b/src/restic_compose_backup/config.py @@ -2,7 +2,7 @@ import os class Config: - default_backup_command = "source /env.sh && rcb backup > /proc/1/fd/1" + default_backup_command = "source /env.sh && /backup.sh && rcb cleanup > /proc/1/fd/1" default_crontab_schedule = "0 2 * * *" """Bag for config values"""