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