Use netcat to check if mailinabox webservice is available
This commit is contained in:
parent
5b23a06a74
commit
2b9ce85ba8
|
@ -41,8 +41,5 @@ EOF
|
|||
chmod +x /etc/cron.daily/mailinabox-statuschecks
|
||||
|
||||
|
||||
# Start it. Remove the api key file first so that start.sh
|
||||
# can wait for it to be created to know that the management
|
||||
# server is ready.
|
||||
rm -f /var/lib/mailinabox/api.key
|
||||
# Start it.
|
||||
restart_service mailinabox
|
||||
|
|
|
@ -72,7 +72,8 @@ if [ ! -z "$IS_DOCKER" ]; then
|
|||
fi
|
||||
|
||||
# Ping the management daemon to write the DNS and nginx configuration files.
|
||||
while [ ! -f /var/lib/mailinabox/api.key ]; do
|
||||
until nc -z -w 4 localhost 10222
|
||||
do
|
||||
echo Waiting for the Mail-in-a-Box management daemon to start...
|
||||
sleep 2
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue