mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-10 11:00:22 +00:00
nextcloud: Don't fail uninstall if DB or user don't not exist
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
da3f498609
commit
c38814b1bc
@ -295,8 +295,8 @@ def uninstall():
|
||||
def _drop_database():
|
||||
"""Drop the mysql database that was created during install."""
|
||||
with action_utils.service_ensure_running('mysql'):
|
||||
query = f'''DROP DATABASE {DB_NAME};
|
||||
DROP User '{DB_USER}'@'localhost';'''
|
||||
query = f'''DROP DATABASE IF EXISTS {DB_NAME};
|
||||
DROP USER IF EXISTS '{DB_USER}'@'localhost';'''
|
||||
subprocess.run(['mysql', '--user', 'root'], input=query.encode(),
|
||||
check=True)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user