Allow user skip unbound healthcheck
This commit is contained in:
parent
76f8a5b7de
commit
ed493f9c3a
@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Skipping DNS check
|
||||||
|
if [[ "${SKIP_DNS_CHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||||
|
SKIP_DNS_CHECK=y
|
||||||
|
fi
|
||||||
|
|
||||||
# Declare log function for logfile inside container
|
# Declare log function for logfile inside container
|
||||||
function log_to_file() {
|
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
|
||||||
@ -66,6 +71,11 @@ function check_netcat() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ ${SKIP_DNS_CHECK} == "y" ]]; then
|
||||||
|
log_to_file "Healthcheck: ALL CHECKS WERE SKIPPED! Unbound is healthy!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# run checks, if check is not returning 0 (return value if check is ok), healthcheck will exit with 1 (marked in docker as unhealthy)
|
# run checks, if check is not returning 0 (return value if check is ok), healthcheck will exit with 1 (marked in docker as unhealthy)
|
||||||
check_ping
|
check_ping
|
||||||
|
|
||||||
|
@ -363,6 +363,10 @@ SKIP_IP_CHECK=n
|
|||||||
|
|
||||||
SKIP_HTTP_VERIFICATION=n
|
SKIP_HTTP_VERIFICATION=n
|
||||||
|
|
||||||
|
# Skip DNS check in Unbound container - y/n
|
||||||
|
|
||||||
|
SKIP_DNS_CHECK=n
|
||||||
|
|
||||||
# Skip ClamAV (clamd-mailcow) anti-virus (Rspamd will auto-detect a missing ClamAV container) - y/n
|
# Skip ClamAV (clamd-mailcow) anti-virus (Rspamd will auto-detect a missing ClamAV container) - y/n
|
||||||
|
|
||||||
SKIP_CLAMD=${SKIP_CLAMD}
|
SKIP_CLAMD=${SKIP_CLAMD}
|
||||||
|
Loading…
Reference in New Issue
Block a user