mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
ttrss: Fix issue with installing after an uninstalling
Tests: - Without the patch, uninstall and reinstall will fail. With patch it passes. - Rerunning setup does not destroy the contents of the database. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
b99ead7aa6
commit
9aa3203733
@ -38,7 +38,7 @@ class TTRSSApp(app_module.App):
|
|||||||
|
|
||||||
app_id = 'ttrss'
|
app_id = 'ttrss'
|
||||||
|
|
||||||
_version = 6
|
_version = 7
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Create components for the app."""
|
"""Create components for the app."""
|
||||||
|
|||||||
@ -77,6 +77,12 @@ def setup():
|
|||||||
|
|
||||||
aug.save()
|
aug.save()
|
||||||
|
|
||||||
|
config = _get_database_config()
|
||||||
|
# dbconfig may not always setup the database and user account correctly.
|
||||||
|
# Following, operation to create database/user is an idempotent operation.
|
||||||
|
postgres.create_database(config['database'], config['user'],
|
||||||
|
config['password'])
|
||||||
|
|
||||||
if action_utils.service_is_enabled('tt-rss'):
|
if action_utils.service_is_enabled('tt-rss'):
|
||||||
action_utils.service_restart('tt-rss')
|
action_utils.service_restart('tt-rss')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user