[Ejabberd] Fix bootstrapping, ejabberd could not be enabled

master
andryyy 2021-02-11 20:46:13 +01:00
parent 9c1bd5c18b
commit 462aa0a764
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 5 additions and 5 deletions

View File

@ -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