From 0dea9e80f34c525aaa3ecca452b91e2007fb54fe Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 1 Mar 2019 16:40:05 -0800 Subject: [PATCH] ttrss: Make setup process reusable Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- actions/ttrss | 5 ++--- plinth/modules/ttrss/__init__.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/ttrss b/actions/ttrss index 350969d58..95ef60ddd 100755 --- a/actions/ttrss +++ b/actions/ttrss @@ -81,9 +81,7 @@ def subcommand_setup(_): aug.save() - action_utils.service_restart('tt-rss') - action_utils.webserver_enable('tt-rss-plinth') - enable_api_access() + action_utils.service_try_restart('tt-rss') def enable_api_access(): @@ -117,6 +115,7 @@ def subcommand_enable(_): """Enable web configuration and reload.""" action_utils.service_enable('tt-rss') action_utils.webserver_enable('tt-rss-plinth') + enable_api_access() def subcommand_disable(_): diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index 7ec11afd0..d2a818632 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -88,6 +88,7 @@ def setup(helper, old_version=None): helper.call('pre', actions.superuser_run, 'ttrss', ['pre-setup']) helper.install(managed_packages) helper.call('post', actions.superuser_run, 'ttrss', ['setup']) + helper.call('post', actions.superuser_run, 'ttrss', ['enable']) global service if service is None: service = service_module.Service(managed_services[0], name, ports=[