Fix wo stack install
This commit is contained in:
@@ -119,13 +119,6 @@ class WOStackController(CementBaseController):
|
|||||||
pargs.admin = True
|
pargs.admin = 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.mariadb:
|
if pargs.mariadb:
|
||||||
pargs.mysql = True
|
pargs.mysql = True
|
||||||
|
|
||||||
@@ -165,6 +158,13 @@ class WOStackController(CementBaseController):
|
|||||||
pargs.clamav = True
|
pargs.clamav = True
|
||||||
pargs.ngxblocker = True
|
pargs.ngxblocker = 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)
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
if pargs.nginx:
|
if pargs.nginx:
|
||||||
Log.debug(self, "Setting apt_packages variable for Nginx")
|
Log.debug(self, "Setting apt_packages variable for Nginx")
|
||||||
|
|||||||
@@ -791,7 +791,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
if os.path.exists('/etc/fail2ban'):
|
if os.path.exists('/etc/fail2ban'):
|
||||||
WOGit.add(self, ["/etc/fail2ban"],
|
WOGit.add(self, ["/etc/fail2ban"],
|
||||||
msg="Adding Fail2ban into Git")
|
msg="Adding Fail2ban into Git")
|
||||||
Log.info(self, "Configuring Fail2Ban")
|
Log.wait(self, "Configuring Fail2Ban")
|
||||||
nginxf2b = bool(os.path.exists('/var/log/nginx'))
|
nginxf2b = bool(os.path.exists('/var/log/nginx'))
|
||||||
data = dict(release=WOVar.wo_version, nginx=nginxf2b)
|
data = dict(release=WOVar.wo_version, nginx=nginxf2b)
|
||||||
WOTemplate.deploy(
|
WOTemplate.deploy(
|
||||||
@@ -815,6 +815,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
self, ['/etc/fail2ban'], msg="Rollback f2b config")
|
self, ['/etc/fail2ban'], msg="Rollback f2b config")
|
||||||
WOService.restart_service(self, 'fail2ban')
|
WOService.restart_service(self, 'fail2ban')
|
||||||
else:
|
else:
|
||||||
|
Log.valide(self, "Configuring Fail2Ban")
|
||||||
WOGit.add(self, ["/etc/fail2ban"],
|
WOGit.add(self, ["/etc/fail2ban"],
|
||||||
msg="Adding Fail2ban into Git")
|
msg="Adding Fail2ban into Git")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user