mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
xmpp: Display current domainname and example user ID.
This commit is contained in:
parent
162b28aafe
commit
19a6e24685
@ -31,6 +31,11 @@
|
|||||||
any other <a href='http://xmpp.org/xmpp-software/clients/' target='_blank'>
|
any other <a href='http://xmpp.org/xmpp-software/clients/' target='_blank'>
|
||||||
XMPP client </a>.</p>
|
XMPP client </a>.</p>
|
||||||
|
|
||||||
|
<p>Your XMPP server domain is set to <b>{{ status.domainname }}</b>. User IDs
|
||||||
|
will look like <i>username@{{ status.domainname }}</i>. You can setup your
|
||||||
|
domain on the system <a href="{% url 'config:index' %}">Configure</a>
|
||||||
|
page.</p>
|
||||||
|
|
||||||
<p><a href='/jwchat' target='_blank' class='btn btn-primary'> Launch web
|
<p><a href='/jwchat' target='_blank' class='btn btn-primary'> Launch web
|
||||||
client</a></p>
|
client</a></p>
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,14 @@ from plinth.modules import xmpp
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def get_domainname():
|
||||||
|
"""Return the domainname"""
|
||||||
|
fqdn = socket.getfqdn()
|
||||||
|
return '.'.join(fqdn.split('.')[1:])
|
||||||
|
|
||||||
def before_install():
|
def before_install():
|
||||||
"""Preseed debconf values before the packages are installed."""
|
"""Preseed debconf values before the packages are installed."""
|
||||||
fqdn = socket.getfqdn()
|
domainname = get_domainname()
|
||||||
domainname = '.'.join(fqdn.split('.')[1:])
|
|
||||||
logger.info('XMPP service domainname - %s', domainname)
|
logger.info('XMPP service domainname - %s', domainname)
|
||||||
actions.superuser_run('xmpp', ['pre-install', '--domainname', domainname])
|
actions.superuser_run('xmpp', ['pre-install', '--domainname', domainname])
|
||||||
|
|
||||||
@ -74,7 +78,8 @@ def index(request):
|
|||||||
def get_status():
|
def get_status():
|
||||||
"""Get the current settings."""
|
"""Get the current settings."""
|
||||||
status = {'enabled': xmpp.is_enabled(),
|
status = {'enabled': xmpp.is_enabled(),
|
||||||
'is_running': xmpp.is_running()}
|
'is_running': xmpp.is_running(),
|
||||||
|
'domainname': get_domainname()}
|
||||||
|
|
||||||
return status
|
return status
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user