mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-11-24 08:32:50 +02:00
Basic port check for build-all.sh
This commit is contained in:
parent
bbd17a7e91
commit
eca679157b
18
port-check.sh
Executable file
18
port-check.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
. mailcow.conf
|
||||
|
||||
for port in ${SMTP_PORT} ${SMTPS_PORT} ${SUBMISSION_PORT} ${IMAP_PORT} ${IMAPS_PORT} ${POP_PORT} ${POPS_PORT} ${SIEVE_PORT} 443; do
|
||||
if [[ ! -z $(ss -tlnp "( sport = :$port )" 2> /dev/null | grep LISTEN | grep -vi docker) ]]; then
|
||||
echo "Port $port is in use by other process."
|
||||
err=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${err} == "1" ]]; then
|
||||
echo
|
||||
echo "Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user