Fix PHP{version}-FPM is not installed

This commit is contained in:
Gabriel Giordano
2023-12-20 23:21:57 -03:00
parent 7c6dab1f08
commit f15a0c4f86

View File

@@ -28,6 +28,13 @@ class WOStackStatusController(CementBaseController):
pargs.netdata = True pargs.netdata = True
pargs.ufw = True pargs.ufw = True
if pargs.php:
if self.app.config.has_section('php'):
config_php_ver = self.app.config.get(
'php', 'version')
current_php = config_php_ver.replace(".", "")
setattr(self.app.pargs, 'php{0}'.format(current_php), True)
if pargs.nginx: if pargs.nginx:
if os.path.exists('{0}'.format(wo_system) + 'nginx.service'): if os.path.exists('{0}'.format(wo_system) + 'nginx.service'):
services = services + ['nginx'] services = services + ['nginx']
@@ -99,6 +106,13 @@ class WOStackStatusController(CementBaseController):
pargs.php = True pargs.php = True
pargs.mysql = True pargs.mysql = True
if pargs.php:
if self.app.config.has_section('php'):
config_php_ver = self.app.config.get(
'php', 'version')
current_php = config_php_ver.replace(".", "")
setattr(self.app.pargs, 'php{0}'.format(current_php), True)
if pargs.nginx: if pargs.nginx:
if os.path.exists('{0}'.format(wo_system) + 'nginx.service'): if os.path.exists('{0}'.format(wo_system) + 'nginx.service'):
services = services + ['nginx'] services = services + ['nginx']
@@ -171,6 +185,13 @@ class WOStackStatusController(CementBaseController):
pargs.mysql = True pargs.mysql = True
pargs.netdata = True pargs.netdata = True
if pargs.php:
if self.app.config.has_section('php'):
config_php_ver = self.app.config.get(
'php', 'version')
current_php = config_php_ver.replace(".", "")
setattr(self.app.pargs, 'php{0}'.format(current_php), True)
if pargs.nginx: if pargs.nginx:
if os.path.exists('{0}'.format(wo_system) + 'nginx.service'): if os.path.exists('{0}'.format(wo_system) + 'nginx.service'):
services = services + ['nginx'] services = services + ['nginx']
@@ -321,6 +342,13 @@ class WOStackStatusController(CementBaseController):
pargs.mysql = True pargs.mysql = True
pargs.fail2ban = True pargs.fail2ban = True
if pargs.php:
if self.app.config.has_section('php'):
config_php_ver = self.app.config.get(
'php', 'version')
current_php = config_php_ver.replace(".", "")
setattr(self.app.pargs, 'php{0}'.format(current_php), True)
if pargs.nginx: if pargs.nginx:
if os.path.exists('{0}'.format(wo_system) + 'nginx.service'): if os.path.exists('{0}'.format(wo_system) + 'nginx.service'):
services = services + ['nginx'] services = services + ['nginx']