mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-01-08 14:39:16 +00:00
Set SOGo related hosts from env var
This commit is contained in:
@@ -10,7 +10,7 @@ class BootstrapNginx(BootstrapBase):
|
||||
# wait for Hosts
|
||||
php_service = os.getenv("PHPFPMHOST") or "php-fpm-mailcow"
|
||||
rspamd_service = os.getenv("RSPAMDHOST") or "rspamd-mailcow"
|
||||
sogo_service = os.getenv("SOGOHOST") or os.getenv("IPV4_NETWORK", "172.22.1") + ".248"
|
||||
sogo_service = os.getenv("SOGOHOST")
|
||||
self.wait_for_host(php_service)
|
||||
if not self.isYes(os.getenv("SKIP_RSPAMD", False)):
|
||||
self.wait_for_host(rspamd_service)
|
||||
|
||||
@@ -17,7 +17,7 @@ class BootstrapSogo(BootstrapBase):
|
||||
self.connect_mysql()
|
||||
|
||||
# Wait until port is free
|
||||
while self.is_port_open("sogo-mailcow", 20000):
|
||||
while self.is_port_open(os.getenv("SOGO_HOST"), 20000):
|
||||
print("Port 20000 still in use — terminating sogod...")
|
||||
self.kill_proc("sogod")
|
||||
time.sleep(3)
|
||||
|
||||
@@ -34,7 +34,7 @@ RUN apk add --update \
|
||||
&& curl https://raw.githubusercontent.com/mludvig/smtp-cli/v3.10/smtp-cli -o /smtp-cli \
|
||||
&& chmod +x smtp-cli
|
||||
|
||||
COPY watchdog.sh /watchdog.sh
|
||||
COPY check_mysql_slavestatus.sh /usr/lib/nagios/plugins/check_mysql_slavestatus.sh
|
||||
COPY data/Dockerfiles/watchdog/watchdog.sh /watchdog.sh
|
||||
COPY data/Dockerfiles/watchdog/check_mysql_slavestatus.sh /usr/lib/nagios/plugins/check_mysql_slavestatus.sh
|
||||
|
||||
CMD ["/watchdog.sh"]
|
||||
|
||||
@@ -402,7 +402,7 @@ sogo_checks() {
|
||||
trap "[ ${err_count} -gt 1 ] && err_count=$(( ${err_count} - 2 ))" USR1
|
||||
while [ ${err_count} -lt ${THRESHOLD} ]; do
|
||||
touch /tmp/sogo-mailcow; echo "$(tail -50 /tmp/sogo-mailcow)" > /tmp/sogo-mailcow
|
||||
host_ip=$(get_container_ip sogo-mailcow)
|
||||
host_ip=$SOGO_HOST
|
||||
err_c_cur=${err_count}
|
||||
/usr/lib/nagios/plugins/check_http -4 -H ${host_ip} -u /SOGo.index/ -p 20000 2>> /tmp/sogo-mailcow 1>&2; err_count=$(( ${err_count} + $? ))
|
||||
[ ${err_c_cur} -eq ${err_count} ] && [ ! $((${err_count} - 1)) -lt 0 ] && err_count=$((${err_count} - 1)) diff_c=1
|
||||
|
||||
Reference in New Issue
Block a user