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