annotate docker/prosody-e2e/entrypoint.sh @ 3672:e4054b648111

plugin XEP-0384: fix calls outside of main thread: `callFromThread` is used instead of `callLater` with a 0 delay, as the later is not made to be called outside of main thread (which was resulting in huge and random delays during calls). fix `OmemoStorage._callMainThread` which was returning wrong Deferred due a late lambda evaluation.
author Goffi <goffi@goffi.org>
date Wed, 08 Sep 2021 17:58:48 +0200
parents 73e04040d577
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 #!/bin/bash
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 set -e
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 usermod -u "$(stat -c %u /var/lib/prosody/.)" prosody
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 if [[ "$1" != "prosody" ]]; then
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 exec prosodyctl "$@"
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 exit 0;
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 fi
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
10
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 fi
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
14
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 exec runuser -u prosody -- "$@"