Fix wo stack install --all

This commit is contained in:
VirtuBox
2019-08-29 18:45:37 +02:00
parent 9b7291d04f
commit 09fa78b92a

View File

@@ -124,8 +124,8 @@ class WOStackController(CementBaseController):
(not pargs.mysql) and (not pargs.wpcli) and
(not pargs.phpmyadmin) and (not pargs.composer) and
(not pargs.netdata) and (not pargs.dashboard) and
(not pargs.fail2ban) and (not pargs.security)
and (not pargs.mysqlclient) and (not pargs.mysqltuner) and
(not pargs.fail2ban) and (not pargs.security) and
(not pargs.mysqlclient) and (not pargs.mysqltuner) and
(not pargs.adminer) and (not pargs.utils) and
(not pargs.redis) and (not pargs.proftpd) and
(not pargs.extplorer) and
@@ -308,7 +308,7 @@ class WOStackController(CementBaseController):
Log.info(self, "phpRedisAdmin already installed")
# Composer
if (pargs.composer and not
if pargs.composer and (not
os.path.isfile('/usr/local/bin/composer')):
Log.debug(self, "Setting packages variable for Composer ")
packages = packages + [["https://getcomposer.org/"
@@ -320,8 +320,9 @@ class WOStackController(CementBaseController):
Log.info(self, "Composer already installed")
# ADMINER
if (pargs.adminer and not
os.path.isfile("{0}22222/htdocs/db/adminer/index.php"
if pargs.adminer and (not
os.path.isfile("{0}22222/htdocs/db/"
"adminer/index.php"
.format(wo_webroot))):
Log.debug(self, "Setting packages variable for Adminer ")
packages = packages + [["https://github.com/vrana/adminer/"
@@ -340,7 +341,7 @@ class WOStackController(CementBaseController):
.format(WOVariables.wo_webroot),
"Adminer theme"]]
# mysqltuner
if (pargs.mysqltuner and not
if pargs.mysqltuner and (not
os.path.isfile("/usr/bin/mysqltuner")):
Log.debug(self, "Setting packages variable for MySQLTuner ")
packages = packages + [["https://raw."
@@ -351,9 +352,9 @@ class WOStackController(CementBaseController):
"MySQLTuner"]]
# Netdata
if (pargs.netdata and
(not os.path.isdir('/opt/netdata') and not
os.path.isdir("/etc/netdata"))):
if pargs.netdata and (
not os.path.isdir('/opt/netdata') and not
os.path.isdir("/etc/netdata")):
Log.debug(self, "Setting packages variable for Netdata")
if WOVariables.wo_distro == 'raspbian':
packages = packages + [['https://my-netdata.io/'
@@ -446,14 +447,15 @@ class WOStackController(CementBaseController):
Log.debug(self, "Setting packages variable for cht.sh")
packages = packages + [["https://cht.sh/:cht.sh",
"/usr/local/bin/cht.sh",
"cht.sh"]]
"cheat.sh"]]
else:
Log.debug(self, "cht.sh is already installed")
Log.info(self, "cht.sh is already installed")
Log.info(self, "cheat.sh is already installed")
except Exception as e:
Log.debug(self, "{0}".format(e))
if (apt_packages) or (packages):
if (apt_packages):
Log.debug(self, "Calling pre_pref")
pre_pref(self, apt_packages)
@@ -490,15 +492,17 @@ class WOStackController(CementBaseController):
pargs = self.app.pargs
if ((not pargs.web) and (not pargs.admin) and
(not pargs.nginx) and (not pargs.php) and
(not pargs.php73) and (not pargs.mysql) and
(not pargs.wpcli) and (not pargs.phpmyadmin) and
(not pargs.mysql) and (not pargs.wpcli) and
(not pargs.phpmyadmin) and (not pargs.composer) and
(not pargs.netdata) and (not pargs.dashboard) and
(not pargs.fail2ban) and (not pargs.security) and
(not pargs.mysqlclient) and (not pargs.mysqltuner) and
(not pargs.adminer) and (not pargs.utils) and
(not pargs.composer) and (not pargs.netdata) and
(not pargs.fail2ban) and (not pargs.proftpd) and
(not pargs.security) and (not pargs.mysqltuner) and
(not pargs.mysqlclient) and
(not pargs.all) and (not pargs.redis) and
(not pargs.phpredisadmin)):
(not pargs.redis) and (not pargs.proftpd) and
(not pargs.extplorer) and
(not pargs.cheat) and (not pargs.clamav) and
(not pargs.phpredisadmin) and
(not pargs.php73)):
pargs.web = True
pargs.admin = True
pargs.security = True
@@ -676,15 +680,17 @@ class WOStackController(CementBaseController):
# Default action for stack purge
if ((not pargs.web) and (not pargs.admin) and
(not pargs.nginx) and (not pargs.php) and
(not pargs.php73) and (not pargs.mysql) and
(not pargs.wpcli) and (not pargs.phpmyadmin) and
(not pargs.mysql) and (not pargs.wpcli) and
(not pargs.phpmyadmin) and (not pargs.composer) and
(not pargs.netdata) and (not pargs.dashboard) and
(not pargs.fail2ban) and (not pargs.security) and
(not pargs.mysqlclient) and (not pargs.mysqltuner) and
(not pargs.adminer) and (not pargs.utils) and
(not pargs.composer) and (not pargs.netdata) and
(not pargs.fail2ban) and (not pargs.proftpd) and
(not pargs.security) and (not pargs.mysqltuner) and
(not pargs.mysqlclient) and
(not pargs.all) and (not pargs.redis) and
(not pargs.phpredisadmin)):
(not pargs.redis) and (not pargs.proftpd) and
(not pargs.extplorer) and
(not pargs.cheat) and (not pargs.clamav) and
(not pargs.phpredisadmin) and
(not pargs.php73)):
pargs.web = True
pargs.admin = True
pargs.security = True