#482: Add PHP 8.2 to WO

This commit is contained in:
Janio Sarmento
2022-12-10 10:37:20 -03:00
parent 2c95e03a1e
commit a76d76ce5f
12 changed files with 556 additions and 69 deletions

View File

@@ -26,6 +26,7 @@ class WOStackStatusController(CementBaseController):
pargs.php74 or
pargs.php80 or
pargs.php81 or
pargs.php82 or
pargs.mysql or
pargs.redis or
pargs.fail2ban or
@@ -66,6 +67,10 @@ class WOStackStatusController(CementBaseController):
services = services + ['php8.1-fpm']
else:
Log.info(self, "PHP8.1-FPM is not installed")
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.php72:
if os.path.exists('{0}'.format(wo_system) + 'php7.2-fpm.service'):
@@ -97,6 +102,12 @@ class WOStackStatusController(CementBaseController):
else:
Log.info(self, "PHP8.1-FPM is not installed")
if pargs.php82:
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.mysql:
if ((WOVar.wo_mysql_host == "localhost") or
(WOVar.wo_mysql_host == "127.0.0.1")):
@@ -145,9 +156,9 @@ class WOStackStatusController(CementBaseController):
services = []
wo_system = "/lib/systemd/system/"
pargs = self.app.pargs
if not (pargs.nginx or pargs.php or
pargs.php72 or pargs.php73 or
pargs.php74 or pargs.php80 or pargs.php81 or
if not (pargs.nginx or
pargs.php or pargs.php72 or pargs.php73 or pargs.php74 or
pargs.php80 or pargs.php81 or pargs.php82 or
pargs.mysql or
pargs.fail2ban or
pargs.netdata or
@@ -207,6 +218,12 @@ class WOStackStatusController(CementBaseController):
else:
Log.info(self, "PHP8.1-FPM is not installed")
if pargs.php82:
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.mysql:
if ((WOVar.wo_mysql_host == "localhost") or
(WOVar.wo_mysql_host == "127.0.0.1")):
@@ -255,9 +272,9 @@ class WOStackStatusController(CementBaseController):
services = []
wo_system = "/lib/systemd/system/"
pargs = self.app.pargs
if not (pargs.nginx or pargs.php or
pargs.php72 or pargs.php73 or
pargs.php74 or pargs.php80 or pargs.php81 or
if not (pargs.nginx or
pargs.php or pargs.php72 or pargs.php73 or pargs.php74 or
pargs.php80 or pargs.php81 or pargs.php82 or
pargs.mysql or
pargs.netdata or
pargs.proftpd or
@@ -295,6 +312,10 @@ class WOStackStatusController(CementBaseController):
services = services + ['php8.1-fpm']
else:
Log.info(self, "PHP8.1-FPM is not installed")
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.php72:
if os.path.exists('{0}'.format(wo_system) + 'php7.2-fpm.service'):
@@ -326,6 +347,12 @@ class WOStackStatusController(CementBaseController):
else:
Log.info(self, "PHP8.1-FPM is not installed")
if pargs.php82:
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.mysql:
if ((WOVar.wo_mysql_host == "localhost") or
(WOVar.wo_mysql_host == "127.0.0.1")):
@@ -380,6 +407,7 @@ class WOStackStatusController(CementBaseController):
pargs.php74 or
pargs.php80 or
pargs.php81 or
pargs.php82 or
pargs.mysql or
pargs.netdata or
pargs.proftpd or
@@ -419,6 +447,10 @@ class WOStackStatusController(CementBaseController):
services = services + ['php8.1-fpm']
else:
Log.info(self, "PHP8.1-FPM is not installed")
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.php72:
if os.path.exists('{0}'.format(wo_system) + 'php7.2-fpm.service'):
@@ -450,6 +482,12 @@ class WOStackStatusController(CementBaseController):
else:
Log.info(self, "PHP8.1-FPM is not installed")
if pargs.php82:
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.mysql:
if ((WOVar.wo_mysql_host == "localhost") or
(WOVar.wo_mysql_host == "127.0.0.1")):
@@ -510,8 +548,8 @@ class WOStackStatusController(CementBaseController):
wo_system = "/lib/systemd/system/"
pargs = self.app.pargs
if not (pargs.nginx or pargs.php or
pargs.php72 or pargs.php73 or
pargs.php74 or pargs.php80 or pargs.php81 or
pargs.php72 or pargs.php73 or pargs.php74 or
pargs.php80 or pargs.php81 or pargs.php82 or
pargs.mysql or
pargs.netdata or
pargs.proftpd or
@@ -549,6 +587,10 @@ class WOStackStatusController(CementBaseController):
services = services + ['php8.1-fpm']
else:
Log.info(self, "PHP8.1-FPM is not installed")
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.php72:
if os.path.exists('{0}'.format(wo_system) + 'php7.2-fpm.service'):
@@ -580,6 +622,12 @@ class WOStackStatusController(CementBaseController):
else:
Log.info(self, "PHP8.1-FPM is not installed")
if pargs.php82:
if os.path.exists('{0}'.format(wo_system) + 'php8.2-fpm.service'):
services = services + ['php8.2-fpm']
else:
Log.info(self, "PHP8.2-FPM is not installed")
if pargs.mysql:
if ((WOVar.wo_mysql_host == "localhost") or
(WOVar.wo_mysql_host == "127.0.0.1")):