add fail2ban removal
This commit is contained in:
@@ -1420,6 +1420,7 @@ class WOStackController(CementBaseController):
|
|||||||
(not self.app.pargs.composer) and
|
(not self.app.pargs.composer) and
|
||||||
(not self.app.pargs.netdata) and
|
(not self.app.pargs.netdata) and
|
||||||
(not self.app.pargs.dashboard) and
|
(not self.app.pargs.dashboard) and
|
||||||
|
(not self.app.pargs.fail2ban) and
|
||||||
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
||||||
(not self.app.pargs.redis) and
|
(not self.app.pargs.redis) and
|
||||||
(not self.app.pargs.phpredisadmin) and
|
(not self.app.pargs.phpredisadmin) and
|
||||||
@@ -1450,6 +1451,7 @@ class WOStackController(CementBaseController):
|
|||||||
self.app.pargs.netdata = True
|
self.app.pargs.netdata = True
|
||||||
self.app.pargs.dashboard = True
|
self.app.pargs.dashboard = True
|
||||||
self.app.pargs.phpredisadmin = True
|
self.app.pargs.phpredisadmin = True
|
||||||
|
self.app.pargs.fail2ban = True
|
||||||
|
|
||||||
# Redis
|
# Redis
|
||||||
if self.app.pargs.redis:
|
if self.app.pargs.redis:
|
||||||
@@ -1741,6 +1743,7 @@ class WOStackController(CementBaseController):
|
|||||||
(not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and
|
(not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and
|
||||||
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
||||||
(not self.app.pargs.composer) and (not self.app.pargs.netdata) and
|
(not self.app.pargs.composer) and (not self.app.pargs.netdata) and
|
||||||
|
(not self.app.pargs.fail2ban) and
|
||||||
(not self.app.pargs.all) and (not self.app.pargs.redis) and
|
(not self.app.pargs.all) and (not self.app.pargs.redis) and
|
||||||
(not self.app.pargs.phpredisadmin)):
|
(not self.app.pargs.phpredisadmin)):
|
||||||
self.app.pargs.web = True
|
self.app.pargs.web = True
|
||||||
@@ -1765,6 +1768,7 @@ class WOStackController(CementBaseController):
|
|||||||
self.app.pargs.netdata = True
|
self.app.pargs.netdata = True
|
||||||
self.app.pargs.dashboard = True
|
self.app.pargs.dashboard = True
|
||||||
self.app.pargs.phpredisadmin = True
|
self.app.pargs.phpredisadmin = True
|
||||||
|
self.app.pargs.fail2ban = True
|
||||||
|
|
||||||
# NGINX
|
# NGINX
|
||||||
if self.app.pargs.nginx:
|
if self.app.pargs.nginx:
|
||||||
@@ -1808,6 +1812,12 @@ class WOStackController(CementBaseController):
|
|||||||
Log.debug(self, "Removing apt_packages variable of MySQL")
|
Log.debug(self, "Removing apt_packages variable of MySQL")
|
||||||
apt_packages = apt_packages + WOVariables.wo_mysql
|
apt_packages = apt_packages + WOVariables.wo_mysql
|
||||||
packages = packages + ['/usr/bin/mysqltuner']
|
packages = packages + ['/usr/bin/mysqltuner']
|
||||||
|
|
||||||
|
# fail2ban
|
||||||
|
if self.app.pargs.redis:
|
||||||
|
Log.debug(self, "Remove apt_packages variable of Fail2ban")
|
||||||
|
apt_packages = apt_packages + WOVariables.wo_fail2ban
|
||||||
|
|
||||||
# WPCLI
|
# WPCLI
|
||||||
if self.app.pargs.wpcli:
|
if self.app.pargs.wpcli:
|
||||||
Log.debug(self, "Removing package variable of WPCLI ")
|
Log.debug(self, "Removing package variable of WPCLI ")
|
||||||
@@ -1912,6 +1922,7 @@ class WOStackController(CementBaseController):
|
|||||||
(not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and
|
(not self.app.pargs.wpcli) and (not self.app.pargs.phpmyadmin) and
|
||||||
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
(not self.app.pargs.adminer) and (not self.app.pargs.utils) and
|
||||||
(not self.app.pargs.composer) and (not self.app.pargs.netdata) and
|
(not self.app.pargs.composer) and (not self.app.pargs.netdata) and
|
||||||
|
(not self.app.pargs.fail2ban) and
|
||||||
(not self.app.pargs.all) and (not self.app.pargs.redis) and
|
(not self.app.pargs.all) and (not self.app.pargs.redis) and
|
||||||
(not self.app.pargs.phpredisadmin)):
|
(not self.app.pargs.phpredisadmin)):
|
||||||
self.app.pargs.web = True
|
self.app.pargs.web = True
|
||||||
@@ -1970,6 +1981,11 @@ class WOStackController(CementBaseController):
|
|||||||
else:
|
else:
|
||||||
Log.error(self, "Cannot Purge PHP 7.3. not found.")
|
Log.error(self, "Cannot Purge PHP 7.3. not found.")
|
||||||
|
|
||||||
|
# fail2ban
|
||||||
|
if self.app.pargs.redis:
|
||||||
|
Log.debug(self, "Remove apt_packages variable of Fail2ban")
|
||||||
|
apt_packages = apt_packages + WOVariables.wo_fail2ban
|
||||||
|
|
||||||
# WP-CLI
|
# WP-CLI
|
||||||
if self.app.pargs.wpcli:
|
if self.app.pargs.wpcli:
|
||||||
Log.debug(self, "Purge package variable WPCLI")
|
Log.debug(self, "Purge package variable WPCLI")
|
||||||
|
|||||||
Reference in New Issue
Block a user