diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 6c9c19da..c7087186 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -627,14 +627,6 @@ function install_xmpp_main { fi fi - prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME "$XMPP_PASSWORD" - if [ ! "$?" = "0" ]; then - echo $'Unable to register prosody user' - exit 347682 - fi - - ${PROJECT_NAME}-pass -u $MY_USERNAME -a xmpp -p "$XMPP_PASSWORD" - function_check configure_firewall_for_xmpp configure_firewall_for_xmpp xmpp_email_headers @@ -648,6 +640,14 @@ function install_xmpp_main { systemctl restart prosody + prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME "$XMPP_PASSWORD" + if [ ! "$?" = "0" ]; then + echo $'Unable to register prosody user' + exit 347682 + fi + + ${PROJECT_NAME}-pass -u $MY_USERNAME -a xmpp -p "$XMPP_PASSWORD" + install_completed xmpp_main }