mirror of
https://port.numenaute.org/aleajactaest/bazar_alea.git
synced 2024-11-09 16:59:02 +00:00
39 lines
1 KiB
Bash
Executable file
39 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
declare WORKDIR="$(dirname $(readlink -f $0))"
|
|
declare XMPPDIR="$WORKDIR/.xmpp"
|
|
|
|
echo "WORKDIR:$WORKDIR"
|
|
echo "XMPPDIR:$XMPPDIR"
|
|
docker pull ejabberd/ecs
|
|
|
|
#if [ ! -d $XMPPDIR ]
|
|
#then
|
|
# mkdir -p $XMPPDIR
|
|
# sudo chown 9000:9000 database
|
|
#fi
|
|
|
|
list=$( docker ps -q -a -f name="ejabberd")
|
|
if [ -z "$list" ]
|
|
then
|
|
docker run --name ejabberd \
|
|
--publish 5222:5222 \
|
|
--publish 5269:5269 \
|
|
--publish 5280:5280 \
|
|
--publish 5443:5443 \
|
|
--publish 1883:1883 \
|
|
ejabberd/ecs
|
|
else
|
|
docker start ejabberd
|
|
docker logs -f ejabberd
|
|
docker stop
|
|
fi
|
|
|
|
# https://localhost:5443/admin/
|
|
# docker exec -it ejabberd bin/ejabberdctl register admin localhost passw0rd
|
|
# docker exec -it ejabberd bin/ejabberdctl register toto localhost toto
|
|
# docker exec -it ejabberd bin/ejabberdctl status
|
|
# docker exec -it ejabberd bin/ejabberdctl stats registeredusers
|
|
# docker exec -it ejabberd bin/ejabberdctl register titi localhost titi
|
|
# docker exec -it ejabberd bin/ejabberdctl register undefined localhost undefined
|
|
|