Files
prosody-docker/entrypoint.sh
T
Kim Alvefur 95a9d24b76 Run with same UID as datadir owner
This should fix problems with owner/uid mismatch when an existing
prosody data directory is mounted into the container

Closes #39
2020-02-13 01:10:36 +01:00

16 lines
287 B
Bash
Executable File

#!/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
runuser -u prosody -- "$@"