Skip to content

Commit

Permalink
Merge pull request #5750 from DocFraggle:staging
Browse files Browse the repository at this point in the history
Fix unbound healthcheck.sh to log all messages to logfile
  • Loading branch information
DerLinkman authored Jun 6, 2024
2 parents 8f3ea09 + 02a55ce commit 27c007e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion data/Dockerfiles/unbound/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ if [[ "${SKIP_UNBOUND_HEALTHCHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
SKIP_UNBOUND_HEALTHCHECK=y
fi

# Reset logfile
echo "$(date +"%Y-%m-%d %H:%M:%S"): Starting health check - logs can be found in /var/log/healthcheck.log"
echo "$(date +"%Y-%m-%d %H:%M:%S"): Starting health check" > /var/log/healthcheck.log

# Declare log function for logfile inside container
function log_to_file() {
echo "$(date +"%Y-%m-%d %H:%M:%S"): $1" > /var/log/healthcheck.log
echo "$(date +"%Y-%m-%d %H:%M:%S"): $1" >> /var/log/healthcheck.log
}

# General Ping function to check general pingability
Expand Down

0 comments on commit 27c007e

Please sign in to comment.