optional healthcheck URL
This commit is contained in:
parent
38284240a0
commit
280d721e5e
2 changed files with 5 additions and 0 deletions
|
@ -59,6 +59,10 @@ do_local_backup () {
|
||||||
|
|
||||||
. /etc/backup/local.config
|
. /etc/backup/local.config
|
||||||
$RESTIC --exclude-file /etc/backup/local.exclude backup --hostname $BACKUP_HOSTNAME $BACKUP_DIR
|
$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 () {
|
do_monitor () {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
BACKUP_HOSTNAME="backuphost.example.org"
|
BACKUP_HOSTNAME="backuphost.example.org"
|
||||||
BACKUP_DIR="/"
|
BACKUP_DIR="/"
|
||||||
|
# HEALTHCHECK_URL="<URL from https://healthchecks.io/checks/ to notify>"
|
||||||
|
|
Loading…
Reference in a new issue