From 1a6bdac9ee4f2a40dfce8293dac4d7dadb9f7b55 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Tue, 17 Jan 2023 12:58:16 +0000 Subject: [PATCH] rebuild of backup command --- backup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 1041701..17801d3 100755 --- a/backup.sh +++ b/backup.sh @@ -17,10 +17,14 @@ if [[ $running ]]; then fi echo "Not currently running. Continuing..." curl https://hc-ping.com/$HEALTHCHECK_UUID/start -$(pwd)/$PRE_RUN_SCRIPT +if [[ $PRE_RUN_SCRIPT ]]; then + $(pwd)/$PRE_RUN_SCRIPT +fi $BACKUP_CMD if [[ $? == 0 ]]; then - $POST_RUN_SCRIPT + if [[ $POST_RUN_SCRIPT ]]; then + $(pwd)/$POST_RUN_SCRIPT + fi curl https://hc-ping.com/$HEALTHCHECK_UUID else curl https://hc-ping.com/$HEALTHCHECK_UUID/fail