From a064248000e914b576623049bfb0e2d01f3dea3c Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sat, 12 Oct 2019 15:30:01 +0200 Subject: [PATCH] added extra parameters for tar --- backup.sh | 2 +- run.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 9b3d8f5..00370a0 100644 --- a/backup.sh +++ b/backup.sh @@ -32,7 +32,7 @@ healthchck_ok(){ cd /backup echo "make archive" -tar -c --checkpoint=.1000 ${TAR_PARAM} -f ~/$BACKUP_FILENAME ./* || healthchck_fail +tar -c --checkpoint=.1000 ${TAR_PARAM} ${TAR_EXTRA_PARAM} -f ~/$BACKUP_FILENAME ./* || healthchck_fail cd / echo " done" diff --git a/run.sh b/run.sh index 1bbb9a6..7c7cde0 100644 --- a/run.sh +++ b/run.sh @@ -3,6 +3,9 @@ # Import GPG public keys gpg --import /keys/* +if [ ${RUN_NOW:-0} -ne 0 ]; then + /backup.sh +fi # Create and install crontab file echo "$CRON_INTERVAL /backup.sh" >> /backup.cron