mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
appsv2: mysqlshow is fucking dumb and returns exit code 0 when DB doesnt exists ...
This commit is contained in:
parent
ab8a6b940f
commit
0ab20b733b
1 changed files with 1 additions and 1 deletions
|
@ -953,7 +953,7 @@ class DatabaseAppResource(AppResource):
|
||||||
|
|
||||||
def db_exists(self, db_name):
|
def db_exists(self, db_name):
|
||||||
if self.dbtype == "mysql":
|
if self.dbtype == "mysql":
|
||||||
return os.system(f"mysqlshow '{db_name}' >/dev/null 2>/dev/null") == 0
|
return os.system(f"mysqlshow | grep -q -w '{db_name}' 2>/dev/null") == 0
|
||||||
elif self.dbtype == "postgresql":
|
elif self.dbtype == "postgresql":
|
||||||
return (
|
return (
|
||||||
os.system(
|
os.system(
|
||||||
|
|
Loading…
Add table
Reference in a new issue