Fix healthcheck
This commit is contained in:
parent
c3280cbd78
commit
bb1e5fa826
2 changed files with 9 additions and 3 deletions
|
|
@ -43,14 +43,22 @@ main() {
|
|||
else
|
||||
local index=0
|
||||
local configurations_found=false
|
||||
local any_failed=false
|
||||
|
||||
while configure_environment $index; do
|
||||
execute_script || true
|
||||
execute_script || any_failed=true
|
||||
configurations_found=true
|
||||
unset BORG_PASSPHRASE BORG_REMOTE_PATH BORG_REPO
|
||||
((index++))
|
||||
done
|
||||
|
||||
echo "Finished backup script at $(date)"
|
||||
if [[ $any_failed == false ]]; then
|
||||
date > /health/backup_completion_time.log # this used by the healtcheck
|
||||
else
|
||||
echo "Skipping completion log due to backup failure(s)"
|
||||
fi
|
||||
|
||||
if [[ $configurations_found == false ]]; then
|
||||
echo "No valid configuration found. Please ensure environment variables are set properly."
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -48,5 +48,3 @@ borg compact --threshold=5 --cleanup-commits --verbose --progress
|
|||
|
||||
btrfs subvolume delete /snapshot/btrfs-root
|
||||
|
||||
echo "Finished backup script at `date`"
|
||||
date > /health/backup_completion_time.log # this used by the healtcheck
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue