annotate docker/prosody_e2e/entrypoint.sh @ 3465:1c7f4ce6a4a2

tools (common/email): try to guess sender domain when necessary: when `DNSNAME` is `localhost.localdomain` and is `mail_sender_domain` is not set, a guess is done to find a proper domain, using `email_from`.
author Goffi <goffi@goffi.org>
date Fri, 19 Feb 2021 15:53:24 +0100
parents 127dde80a0a5
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 -- "$@"