mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
roundcube: Remove get-enabled from actions
This commit is contained in:
1 parent
4906384b39
commit
384867dc25
3 files changed
+11
-22
No files matched your search
@@ -22,6 +22,7 @@ Plinth module to configure Roundcube.
|
||||
from gettext import gettext as _
|
||||
|
||||
from plinth import actions
|
||||
from plinth import action_utils
|
||||
from plinth import cfg
|
||||
from plinth import service as service_module
|
||||
|
||||
@@ -34,3 +35,7 @@ def init():
|
||||
menu = cfg.main_menu.get('apps:index')
|
||||
menu.add_urlname(_('Email Client (Roundcube)'), 'glyphicon-envelope',
|
||||
'roundcube:index', 50)
|
||||
|
||||
def is_enabled():
|
||||
"""Return whether the module is enabled."""
|
||||
return action_utils.webserver_is_enabled('roundcube')
|
||||
@@ -27,6 +27,7 @@ import logging
|
||||
from .forms import RoundcubeForm
|
||||
from plinth import actions
|
||||
from plinth import package
|
||||
from plinth.modules import roundcube
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -67,10 +68,7 @@ def index(request):
|
||||
|
||||
def get_status():
|
||||
"""Get the current status."""
|
||||
output = actions.run('roundcube', ['get-enabled'])
|
||||
enabled = (output.strip() == 'yes')
|
||||
|
||||
return {'enabled': enabled}
|
||||
return {'enabled': roundcube.is_enabled()}
|
||||
|
||||
|
||||
def _apply_changes(request, old_status, new_status):
|
||||
|
||||
Reference in new issue
Block a user