Fix healtcheck again
This commit is contained in:
parent
40d87a9d32
commit
909f7fbb6d
2 changed files with 9 additions and 2 deletions
|
|
@ -37,9 +37,16 @@ configure_environment() {
|
|||
}
|
||||
|
||||
main() {
|
||||
# Clear health log at start - only a fully successful run should be marked healthy
|
||||
rm -f /health/backup_completion_time.log
|
||||
|
||||
if [ -n "$BORG_REPO" ]; then
|
||||
# fallback case if multi-target backup isn't needed
|
||||
execute_script
|
||||
if execute_script; then
|
||||
date > /health/backup_completion_time.log
|
||||
else
|
||||
echo "Skipping completion log due to backup failure"
|
||||
fi
|
||||
else
|
||||
local index=0
|
||||
local configurations_found=false
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ get_log_file_name() {
|
|||
echo "/backup-logs/backup_$(date +%Y)_week_$(date +%U).log"
|
||||
}
|
||||
|
||||
echo "Starting schedule script at `date`" | log_message
|
||||
echo "Starting schedule script at $(date)" | log_message
|
||||
|
||||
while true; do
|
||||
exec /src/backup-wrapper.sh 2>&1 | log_message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue