2014-12-08 02:59:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2020-02-13 00:10:36 +00:00
|
|
|
usermod -u "$(stat -c %u /var/lib/prosody/.)" prosody
|
|
|
|
|
2016-02-04 19:19:17 +00:00
|
|
|
if [[ "$1" != "prosody" ]]; then
|
2019-03-16 18:19:37 +00:00
|
|
|
exec prosodyctl "$@"
|
2016-02-04 19:19:17 +00:00
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
2014-12-08 02:59:37 +00:00
|
|
|
if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
|
2019-03-16 18:19:37 +00:00
|
|
|
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
|
2014-12-08 02:59:37 +00:00
|
|
|
fi
|
|
|
|
|
2020-10-10 19:20:17 +00:00
|
|
|
exec runuser -u prosody -- "$@"
|