[ACME, Watchdog] Improve waiting for Redis

master
andryyy 2020-03-08 20:23:32 +01:00
parent 56538c4ef8
commit e28a176639
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 12 additions and 7 deletions

View File

@ -9,6 +9,11 @@ else
export REDIS_CMDLINE="redis-cli -h redis -p 6379"
fi
until [[ $(${REDIS_CMDLINE} PING) == "PONG" ]]; do
echo "Waiting for Redis..."
sleep 2
done
source /srv/functions.sh
# Thanks to https://github.com/cvmiller -> https://github.com/cvmiller/expand6
source /srv/expand6.sh

View File

@ -25,11 +25,6 @@ while ! mysqladmin status --socket=/var/run/mysqld/mysqld.sock -u${DBUSER} -p${D
sleep 2
done
until [[ $(redis-cli -h redis-mailcow PING) == "PONG" ]]; do
echo "Waiting for Redis..."
sleep 2
done
# Do not attempt to write to slave
if [[ ! -z ${REDIS_SLAVEOF_IP} ]]; then
REDIS_CMDLINE="redis-cli -h ${REDIS_SLAVEOF_IP} -p ${REDIS_SLAVEOF_PORT}"
@ -37,6 +32,11 @@ else
REDIS_CMDLINE="redis-cli -h redis -p 6379"
fi
until [[ $(${REDIS_CMDLINE} PING) == "PONG" ]]; do
echo "Waiting for Redis..."
sleep 2
done
${REDIS_CMDLINE} DEL F2B_RES > /dev/null
# Common functions

View File

@ -333,7 +333,7 @@ services:
acme-mailcow:
depends_on:
- nginx-mailcow
image: mailcow/acme:1.68
image: mailcow/acme:1.69
dns:
- ${IPV4_NETWORK:-172.22.1}.254
environment:
@ -387,7 +387,7 @@ services:
- /lib/modules:/lib/modules:ro
watchdog-mailcow:
image: mailcow/watchdog:1.71
image: mailcow/watchdog:1.72
# Debug
#command: /watchdog.sh
dns: