Fix MariaDB upgrade on Github actions
This commit is contained in:
@@ -49,6 +49,8 @@ class WOStackController(CementBaseController):
|
|||||||
dict(help='Install PHP 7.4 stack', action='store_true')),
|
dict(help='Install PHP 7.4 stack', action='store_true')),
|
||||||
(['--mysql'],
|
(['--mysql'],
|
||||||
dict(help='Install MySQL stack', action='store_true')),
|
dict(help='Install MySQL stack', action='store_true')),
|
||||||
|
(['--mariadb'],
|
||||||
|
dict(help='Install MySQL stack alias', action='store_true')),
|
||||||
(['--mysqlclient'],
|
(['--mysqlclient'],
|
||||||
dict(help='Install MySQL client for remote MySQL server',
|
dict(help='Install MySQL client for remote MySQL server',
|
||||||
action='store_true')),
|
action='store_true')),
|
||||||
@@ -120,7 +122,7 @@ class WOStackController(CementBaseController):
|
|||||||
pargs.dashboard or pargs.fail2ban or pargs.security or
|
pargs.dashboard or pargs.fail2ban or pargs.security or
|
||||||
pargs.mysqlclient or pargs.mysqltuner or
|
pargs.mysqlclient or pargs.mysqltuner or
|
||||||
pargs.admin or pargs.adminer or
|
pargs.admin or pargs.adminer or
|
||||||
pargs.utils or pargs.redis or
|
pargs.utils or pargs.redis or pargs.mariadb or
|
||||||
pargs.proftpd or pargs.extplorer or
|
pargs.proftpd or pargs.extplorer or
|
||||||
pargs.clamav or pargs.cheat or pargs.nanorc or
|
pargs.clamav or pargs.cheat or pargs.nanorc or
|
||||||
pargs.ufw or pargs.ngxblocker or
|
pargs.ufw or pargs.ngxblocker or
|
||||||
@@ -132,6 +134,9 @@ class WOStackController(CementBaseController):
|
|||||||
if pargs.php:
|
if pargs.php:
|
||||||
pargs.php72 = True
|
pargs.php72 = True
|
||||||
|
|
||||||
|
if pargs.mariadb:
|
||||||
|
pargs.mysql = True
|
||||||
|
|
||||||
if pargs.all:
|
if pargs.all:
|
||||||
pargs.web = True
|
pargs.web = True
|
||||||
pargs.admin = True
|
pargs.admin = True
|
||||||
@@ -555,6 +560,7 @@ class WOStackController(CementBaseController):
|
|||||||
if ((not pargs.web) and (not pargs.admin) and
|
if ((not pargs.web) and (not pargs.admin) and
|
||||||
(not pargs.nginx) and (not pargs.php) and
|
(not pargs.nginx) and (not pargs.php) and
|
||||||
(not pargs.mysql) and (not pargs.wpcli) and
|
(not pargs.mysql) and (not pargs.wpcli) and
|
||||||
|
(not pargs.mariadb) and
|
||||||
(not pargs.phpmyadmin) and (not pargs.composer) and
|
(not pargs.phpmyadmin) and (not pargs.composer) and
|
||||||
(not pargs.netdata) and (not pargs.dashboard) and
|
(not pargs.netdata) and (not pargs.dashboard) and
|
||||||
(not pargs.fail2ban) and (not pargs.security) and
|
(not pargs.fail2ban) and (not pargs.security) and
|
||||||
@@ -572,6 +578,9 @@ class WOStackController(CementBaseController):
|
|||||||
if pargs.php:
|
if pargs.php:
|
||||||
pargs.php72 = True
|
pargs.php72 = True
|
||||||
|
|
||||||
|
if pargs.mariadb:
|
||||||
|
pargs.mysql = True
|
||||||
|
|
||||||
if pargs.all:
|
if pargs.all:
|
||||||
pargs.web = True
|
pargs.web = True
|
||||||
pargs.admin = True
|
pargs.admin = True
|
||||||
@@ -868,6 +877,7 @@ class WOStackController(CementBaseController):
|
|||||||
if ((not pargs.web) and (not pargs.admin) and
|
if ((not pargs.web) and (not pargs.admin) and
|
||||||
(not pargs.nginx) and (not pargs.php) and
|
(not pargs.nginx) and (not pargs.php) and
|
||||||
(not pargs.mysql) and (not pargs.wpcli) and
|
(not pargs.mysql) and (not pargs.wpcli) and
|
||||||
|
(not pargs.mariadb) and
|
||||||
(not pargs.phpmyadmin) and (not pargs.composer) and
|
(not pargs.phpmyadmin) and (not pargs.composer) and
|
||||||
(not pargs.netdata) and (not pargs.dashboard) and
|
(not pargs.netdata) and (not pargs.dashboard) and
|
||||||
(not pargs.fail2ban) and (not pargs.security) and
|
(not pargs.fail2ban) and (not pargs.security) and
|
||||||
@@ -885,6 +895,9 @@ class WOStackController(CementBaseController):
|
|||||||
if pargs.php:
|
if pargs.php:
|
||||||
pargs.php72 = True
|
pargs.php72 = True
|
||||||
|
|
||||||
|
if pargs.mariadb:
|
||||||
|
pargs.mysql = True
|
||||||
|
|
||||||
if pargs.all:
|
if pargs.all:
|
||||||
pargs.web = True
|
pargs.web = True
|
||||||
pargs.admin = True
|
pargs.admin = True
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class WOStackMigrateController(CementBaseController):
|
|||||||
]
|
]
|
||||||
|
|
||||||
@expose(hide=True)
|
@expose(hide=True)
|
||||||
def migrate_mariadb(self):
|
def migrate_mariadb(self, ci=False):
|
||||||
# Backup all database
|
# Backup all database
|
||||||
WOMysql.backupAll(self, fulldump=True)
|
WOMysql.backupAll(self, fulldump=True)
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ class WOStackMigrateController(CementBaseController):
|
|||||||
WOAptGet.remove(self, ["mariadb-server"])
|
WOAptGet.remove(self, ["mariadb-server"])
|
||||||
WOAptGet.auto_remove(self)
|
WOAptGet.auto_remove(self)
|
||||||
WOAptGet.install(self, WOVar.wo_mysql)
|
WOAptGet.install(self, WOVar.wo_mysql)
|
||||||
if not self.app.args.ci:
|
if not ci:
|
||||||
WOAptGet.dist_upgrade(self)
|
WOAptGet.dist_upgrade(self)
|
||||||
WOAptGet.auto_remove(self)
|
WOAptGet.auto_remove(self)
|
||||||
Log.valide(self, "Upgrading MariaDB ")
|
Log.valide(self, "Upgrading MariaDB ")
|
||||||
@@ -91,7 +91,10 @@ class WOStackMigrateController(CementBaseController):
|
|||||||
start_upgrade = input("Do you want to continue:[y/N]")
|
start_upgrade = input("Do you want to continue:[y/N]")
|
||||||
if start_upgrade != "Y" and start_upgrade != "y":
|
if start_upgrade != "Y" and start_upgrade != "y":
|
||||||
Log.error(self, "Not starting package update")
|
Log.error(self, "Not starting package update")
|
||||||
self.migrate_mariadb()
|
if not pargs.ci:
|
||||||
|
self.migrate_mariadb()
|
||||||
|
else:
|
||||||
|
self.migrate_mariadb(ci=True)
|
||||||
else:
|
else:
|
||||||
Log.error(self, "Your current MySQL is not alive or "
|
Log.error(self, "Your current MySQL is not alive or "
|
||||||
"you allready installed MariaDB")
|
"you allready installed MariaDB")
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
dict(help='Upgrade PHP 7.4 stack', action='store_true')),
|
dict(help='Upgrade PHP 7.4 stack', action='store_true')),
|
||||||
(['--mysql'],
|
(['--mysql'],
|
||||||
dict(help='Upgrade MySQL stack', action='store_true')),
|
dict(help='Upgrade MySQL stack', action='store_true')),
|
||||||
|
(['--mariadb'],
|
||||||
|
dict(help='Upgrade MySQL stack alias',
|
||||||
|
action='store_true')),
|
||||||
(['--wpcli'],
|
(['--wpcli'],
|
||||||
dict(help='Upgrade WPCLI', action='store_true')),
|
dict(help='Upgrade WPCLI', action='store_true')),
|
||||||
(['--redis'],
|
(['--redis'],
|
||||||
@@ -79,14 +82,18 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
wo_phpmyadmin = WODownload.pma_release(self)
|
wo_phpmyadmin = WODownload.pma_release(self)
|
||||||
if not (pargs.web or pargs.nginx or pargs.php or
|
if not (pargs.web or pargs.nginx or pargs.php or
|
||||||
pargs.php72 or pargs.php73 or pargs.php74 or pargs.mysql or
|
pargs.php72 or pargs.php73 or pargs.php74 or pargs.mysql or
|
||||||
pargs.ngxblocker or pargs.all or pargs.netdata or
|
pargs.mariadb or pargs.ngxblocker or pargs.all
|
||||||
pargs.wpcli or pargs.composer or pargs.phpmyadmin or
|
or pargs.netdata or pargs.wpcli or pargs.composer or
|
||||||
pargs.adminer or pargs.dashboard or pargs.mysqltuner or
|
pargs.phpmyadmin or pargs.adminer or pargs.dashboard or
|
||||||
pargs.redis or pargs.fail2ban or pargs.security):
|
pargs.mysqltuner or pargs.redis or
|
||||||
|
pargs.fail2ban or pargs.security):
|
||||||
pargs.web = True
|
pargs.web = True
|
||||||
pargs.admin = True
|
pargs.admin = True
|
||||||
pargs.security = True
|
pargs.security = True
|
||||||
|
|
||||||
|
if pargs.mariadb:
|
||||||
|
pargs.mysql = True
|
||||||
|
|
||||||
if pargs.php:
|
if pargs.php:
|
||||||
pargs.php72 = True
|
pargs.php72 = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user