rebuild of backup command

This commit is contained in:
Paul Wilde 2023-01-17 12:58:16 +00:00
parent 28b56eed84
commit 1a6bdac9ee

View file

@ -17,10 +17,14 @@ if [[ $running ]]; then
fi fi
echo "Not currently running. Continuing..." echo "Not currently running. Continuing..."
curl https://hc-ping.com/$HEALTHCHECK_UUID/start curl https://hc-ping.com/$HEALTHCHECK_UUID/start
if [[ $PRE_RUN_SCRIPT ]]; then
$(pwd)/$PRE_RUN_SCRIPT $(pwd)/$PRE_RUN_SCRIPT
fi
$BACKUP_CMD $BACKUP_CMD
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
$POST_RUN_SCRIPT if [[ $POST_RUN_SCRIPT ]]; then
$(pwd)/$POST_RUN_SCRIPT
fi
curl https://hc-ping.com/$HEALTHCHECK_UUID curl https://hc-ping.com/$HEALTHCHECK_UUID
else else
curl https://hc-ping.com/$HEALTHCHECK_UUID/fail curl https://hc-ping.com/$HEALTHCHECK_UUID/fail