Use package framework for installing ejabberd and jwchat

This commit is contained in:
Sunil Mohan Adapa committed 2015-01-05 00:27:45 +05:30
1 parent c7f27e493e
commit b3e8e53c73
3 files changed
+3 -58

No files matched your search

-14
View File
@@ -22,8 +22,6 @@
{% block content %}
{% if is_installed %}
<p>XMPP is an open and standardized communication protocol. Here you
can run and configure your XMPP server, called ejabberd. To actually
communicate, you can use the <a href='/jwchat'>web client</a> or any
@@ -33,16 +31,4 @@
<p><a href='/jwchat' target='_blank'class='btn btn-primary'> Launch web
client</a></p>
{% else %}
<h2>XMPP Server</h2>
<p>The XMPP server <i>ejabberd</i> is not installed.</p>
<p>ejabberd comes pre-installed with {{ cfg.box_name }}. On any Debian-based
system (such as {{ cfg.box_name }}) you may install it using the command
<code>aptitude install ejabberd</code>.</p>
{% endif %}
{% endblock %}
+3 -11
View File
@@ -25,6 +25,7 @@ import logging
from plinth import actions
from plinth import cfg
from plinth import package
from plinth import service
from plinth.signals import pre_hostname_change, post_hostname_change
from plinth.signals import domainname_change
@@ -61,21 +62,12 @@ def init():
@login_required
@package.required('jwchat', 'ejabberd')
def index(request):
"""Serve XMPP page"""
is_installed = actions.superuser_run(
'xmpp',
['get-installed']).strip() == 'installed'
if is_installed:
index_subsubmenu = subsubmenu
else:
index_subsubmenu = None
return TemplateResponse(request, 'xmpp.html',
{'title': _('XMPP Server'),
'is_installed': is_installed,
'subsubmenu': index_subsubmenu})
'subsubmenu': subsubmenu})
class ConfigureForm(forms.Form): # pylint: disable-msg=W0232