Merge pull request #14 from Aterfax/Update-run_include-to-silence-healthcheck-output

Update run_include to silence healthcheck output.
This commit is contained in:
Aterfax 2025-03-24 14:53:38 +00:00 committed by GitHub
commit c69aa29b60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,7 @@ fi
# to allow the first backup or we're
if [ "$CRON_BACKUP_ONLY" = "0" ] || [ -e "${lastrunfile}" ]; then
if [ -n "$HEALTHCHECKSURL" ]; then
curl -fsS -m 10 --retry 5 $HEALTHCHECKSURL/start
curl -fsS -m 10 --retry 5 -o /dev/null $HEALTHCHECKSURL/start
fi
# Run the actual backup command.
@ -72,7 +72,7 @@ if [ "$CRON_BACKUP_ONLY" = "0" ] || [ -e "${lastrunfile}" ]; then
if [ -n "$HEALTHCHECKSURL" ]; then
# We pipe the exit code to healthchecks, if it isn't zero, a warning will fire.
curl -fsS -m 10 --retry 5 ${HEALTHCHECKSURL}/${BACKUP_EXIT_CODE}
curl -fsS -m 10 --retry 5 -o /dev/null ${HEALTHCHECKSURL}/${BACKUP_EXIT_CODE}
fi
elif [ "$CRON_BACKUP_ONLY" = "1" ]; then
echo "CRON_BACKUP_ONLY=1, skipping container start up initial backup."
@ -83,4 +83,4 @@ fi
# Set this so backups always happen after the first run via CRON given logic above.
# The date may also be useful for something like a health check if I write it...
# First run touches the file. Backups will set the date.
touch "${lastrunfile}"
touch "${lastrunfile}"