From 462aa0a764ecadbd98467659bf9adfa97f3a038c Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 11 Feb 2021 20:46:13 +0100 Subject: [PATCH] [Ejabberd] Fix bootstrapping, ejabberd could not be enabled --- data/Dockerfiles/ejabberd/docker-entrypoint.sh | 10 +++++----- data/conf/ejabberd/autogen/.gitkeep | 0 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 data/conf/ejabberd/autogen/.gitkeep diff --git a/data/Dockerfiles/ejabberd/docker-entrypoint.sh b/data/Dockerfiles/ejabberd/docker-entrypoint.sh index 355bb32f..3853def7 100755 --- a/data/Dockerfiles/ejabberd/docker-entrypoint.sh +++ b/data/Dockerfiles/ejabberd/docker-entrypoint.sh @@ -22,11 +22,6 @@ while ! mysqladmin status --socket=/var/run/mysqld/mysqld.sock -u${DBUSER} -p${D sleep 2 done -if [[ -z "$(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -B -e 'SELECT domain FROM domain WHERE xmpp = 1')" ]]; then - echo "No XMPP host configured, sleeping the sleep of the righteous, waiting for someone to wake me up..." - exec su-exec ejabberd tini -g -- sleep 365d -fi - # We dont want to give global write access to ejabberd in this directory chown -R root:root /var/www/authentication @@ -90,4 +85,9 @@ done alias ejabberdctl="su-exec ejabberd /home/ejabberd/bin/ejabberdctl --node ejabberd@${MAILCOW_HOSTNAME}" +if [[ -z "$(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -B -e 'SELECT domain FROM domain WHERE xmpp = 1')" ]]; then + echo "No XMPP host configured, sleeping the sleep of the righteous, waiting for someone to wake me up..." + exec su-exec ejabberd tini -g -- sleep 365d +fi + exec su-exec ejabberd tini -g -- /home/ejabberd/bin/ejabberdctl --node ejabberd@${MAILCOW_HOSTNAME} foreground diff --git a/data/conf/ejabberd/autogen/.gitkeep b/data/conf/ejabberd/autogen/.gitkeep new file mode 100644 index 00000000..e69de29b