diff --git a/backup.sh b/backup.sh index f7ad944..13edbb9 100644 --- a/backup.sh +++ b/backup.sh @@ -13,6 +13,7 @@ curl https://hc-ping.com/$HEALTH_UUID/start $PRE_RUN_SCRIPTS $BACKUP_CMD if [[ $? == 0 ]]; then + $POST_RUN_SCRIPTS curl https://hc-ping.com/$HEALTH_UUID else curl https://hc-ping.com/$HEALTH_UUID/fail diff --git a/env.sample.sh b/env.sample.sh index 7da32bd..06dcbfe 100644 --- a/env.sample.sh +++ b/env.sample.sh @@ -2,6 +2,8 @@ NAME=Backup Name BACKUP_DIR=/dir/to/back/up BACKUP_PARAMS="" HEALTHCHECK_UUID="healthchecks.io uuid" +PRE_RUN_SCRIPT="script to pre-run" +POST_RUN_SCRIPT="script to post-run" export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY=