Use netcat to check if mailinabox webservice is available
[JT added installing netcat-openbsd in system.sh]
This commit is contained in:
parent
5edaeb8c7b
commit
ce17c12ca2
|
@ -42,8 +42,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
|
||||
|
|
|
@ -103,7 +103,8 @@ source setup/management.sh
|
|||
source setup/munin.sh
|
||||
|
||||
# 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
|
||||
|
|
|
@ -36,13 +36,14 @@ apt_get_quiet upgrade
|
|||
# * cron: Runs background processes periodically.
|
||||
# * ntp: keeps the system time correct
|
||||
# * fail2ban: scans log files for repeated failed login attempts and blocks the remote IP at the firewall
|
||||
# * netcat-openbsd: `nc` command line networking tool
|
||||
# * git: we install some things directly from github
|
||||
# * sudo: allows privileged users to execute commands as root without being root
|
||||
# * coreutils: includes `nproc` tool to report number of processors
|
||||
# * bc: allows us to do math to compute sane defaults
|
||||
|
||||
apt_install python3 python3-dev python3-pip \
|
||||
wget curl git sudo coreutils bc \
|
||||
netcat-openbsd wget curl git sudo coreutils bc \
|
||||
haveged unattended-upgrades cron ntp fail2ban
|
||||
|
||||
# Allow apt to install system updates automatically every day.
|
||||
|
|
Loading…
Reference in New Issue