mirror of
https://github.com/edv-pi/pbs-client-docker.git
synced 2025-04-16 17:32:55 +02:00
Update run_include to silence healthcheck output.
This commit is contained in:
parent
4312e6db39
commit
1f23e92047
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user