From 8d1347a34cb21b8a139ccba1f981cea6fc8dc0b8 Mon Sep 17 00:00:00 2001 From: matthias Date: Wed, 16 Oct 2019 04:56:25 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Ebackup.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backup.sh b/backup.sh index 101d881..8a1c3da 100644 --- a/backup.sh +++ b/backup.sh @@ -23,12 +23,20 @@ healthchck_fail(){ fi } +healthchck_start(){ + if [ -n $HEALTHCHECK_URL ]; then + curl --retry 3 $HEALTHCHECK_URL/start + exit 1 + fi +} + healthchck_ok(){ if [ -n $HEALTHCHECK_URL ]; then curl --retry 3 $HEALTHCHECK_URL fi } +healthchck_start cd /backup echo "make archive" tar -c --checkpoint=.1000 ${TAR_PARAM} ${TAR_EXTRA_PARAM} -f ~/$BACKUP_FILENAME ./* || healthchck_fail