mirror of
https://github.com/processone/ejabberd
synced 2025-10-04 02:09:33 +02:00
Sync containers from rroemhild and add instructions in README (#1655)
This commit is contained in:
parent
30e5c9bd3e
commit
b8ab80d1f3
11 changed files with 231 additions and 49 deletions
28
docker/examples/docker-compose-cluster/scripts/pre/30_join_cluster.sh
Executable file
28
docker/examples/docker-compose-cluster/scripts/pre/30_join_cluster.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
source "${EJABBERD_HOME}/scripts/lib/base_config.sh"
|
||||
source "${EJABBERD_HOME}/scripts/lib/config.sh"
|
||||
source "${EJABBERD_HOME}/scripts/lib/base_functions.sh"
|
||||
source "${EJABBERD_HOME}/scripts/lib/functions.sh"
|
||||
|
||||
|
||||
get_cluster_node_from_dns() {
|
||||
local cluster_host=$(drill ${DOMAINNAME} \
|
||||
| grep ${DOMAINNAME} \
|
||||
| grep -v ${HOSTIP} \
|
||||
| awk '{print $5}' \
|
||||
| grep -v "^$" \
|
||||
| head -1)
|
||||
echo $(discover_dns_hostname ${cluster_host})
|
||||
}
|
||||
|
||||
|
||||
file_exist ${FIRST_START_DONE_FILE} \
|
||||
&& exit 0
|
||||
|
||||
|
||||
join_cluster $(get_cluster_node_from_dns)
|
||||
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue