mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
zoph: Ensure that database server is running when setting up app
When mysql server is not running, app installation fails. Similarly the setup process will fail when app is being upgrade and database upgrade needs to be performed. So, ensure that database server is running before attempting install/upgrade of app. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ec52d9bed9
commit
c341a531dd
@ -102,7 +102,11 @@ class ZophApp(app_module.App):
|
||||
def setup(self, old_version):
|
||||
"""Install and configure the app."""
|
||||
privileged.pre_install()
|
||||
super().setup(old_version)
|
||||
with self.get_component('shared-daemon-zoph-mysql').ensure_running():
|
||||
# Database needs to be running for successful initialization or
|
||||
# upgrade of zoph database.
|
||||
super().setup(old_version)
|
||||
|
||||
privileged.setup()
|
||||
if not old_version:
|
||||
self.enable()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user