diff docker/prosody-e2e/entrypoint.sh @ 3497:73e04040d577

docker: update following name changes: `backend_e2e` now print properly backend logs
author Goffi <goffi@goffi.org>
date Fri, 16 Apr 2021 18:32:16 +0200
parents docker/prosody_e2e/entrypoint.sh@127dde80a0a5
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docker/prosody-e2e/entrypoint.sh	Fri Apr 16 18:32:16 2021 +0200
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+usermod -u "$(stat -c %u /var/lib/prosody/.)" prosody
+
+if [[ "$1" != "prosody" ]]; then
+    exec prosodyctl "$@"
+    exit 0;
+fi
+
+if [ "$LOCAL" -a  "$PASSWORD" -a "$DOMAIN" ] ; then
+    prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
+fi
+
+exec runuser -u prosody -- "$@"