diff --git a/actions/searx b/actions/searx index 70217941b..8cf5ff81f 100755 --- a/actions/searx +++ b/actions/searx @@ -152,20 +152,14 @@ def subcommand_setup(_): def subcommand_enable(_): """Enable web configuration and reload.""" - if not os.path.exists('/etc/uwsgi/apps-enabled/searx.ini'): - os.symlink('/etc/uwsgi/apps-available/searx.ini', - '/etc/uwsgi/apps-enabled/searx.ini') - - action_utils.service_enable('uwsgi') - action_utils.service_restart('uwsgi') + action_utils.uwsgi_enable('searx') action_utils.webserver_enable('searx-freedombox') def subcommand_disable(_): """Disable web configuration and reload.""" action_utils.webserver_disable('searx-freedombox') - os.unlink('/etc/uwsgi/apps-enabled/searx.ini') - action_utils.service_restart('uwsgi') + action_utils.uwsgi_disable('searx') def main(): diff --git a/plinth/modules/searx/__init__.py b/plinth/modules/searx/__init__.py index 7195506b2..53e64468e 100644 --- a/plinth/modules/searx/__init__.py +++ b/plinth/modules/searx/__init__.py @@ -18,8 +18,6 @@ FreedomBox app to configure Searx. """ -import os - from django.utils.translation import ugettext_lazy as _ from plinth import service as service_module @@ -105,7 +103,7 @@ def get_safe_search_setting(): def is_enabled(): """Return whether the module is enabled.""" return (action_utils.webserver_is_enabled('searx-freedombox') - and os.path.exists('/etc/uwsgi/apps-enabled/searx.ini')) + and action_utils.uwsgi_is_enabled('searx')) def enable():