mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-07-22 17:49:46 +00:00
Fix unbound healthcheck.sh to log all messages to logfile
This commit is contained in:
parent
6f4720e1ea
commit
02a55ce9db
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue