optional healthcheck URL

This commit is contained in:
Jan-Piet Mens 2017-09-04 16:38:38 +02:00
parent 38284240a0
commit 280d721e5e
2 changed files with 5 additions and 0 deletions

View file

@ -59,6 +59,10 @@ do_local_backup () {
. /etc/backup/local.config
$RESTIC --exclude-file /etc/backup/local.exclude backup --hostname $BACKUP_HOSTNAME $BACKUP_DIR
if [ -n "$HEALTHCHECK_URL" ]; then
curl -fsS --retry 4 "$HEALTHCHECK_URL" > /dev/null
fi
}
do_monitor () {

View file

@ -1,2 +1,3 @@
BACKUP_HOSTNAME="backuphost.example.org"
BACKUP_DIR="/"
# HEALTHCHECK_URL="<URL from https://healthchecks.io/checks/ to notify>"