ttrss: Make setup process reusable

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-03-01 16:40:05 -08:00 committed by James Valleroy
parent 2f0bc29239
commit 0dea9e80f3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 3 additions and 3 deletions

View File

@ -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(_):

View File

@ -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=[