Set php 7.4 as default php version
* `wo stack install` will check php version to install in /etc/wo/wo.conf
This commit is contained in:
@@ -810,11 +810,11 @@ def sitebackup(self, data):
|
|||||||
if data['wo_db_name']:
|
if data['wo_db_name']:
|
||||||
Log.info(self, 'Backing up database \t\t', end='')
|
Log.info(self, 'Backing up database \t\t', end='')
|
||||||
try:
|
try:
|
||||||
if not WOShellExec.cmd_exec(self, "mysqldump --single-transaction "
|
if not WOShellExec.cmd_exec(
|
||||||
"{0} | zstd -T0 -c"
|
self, "mysqldump --single-transaction --hex-blob "
|
||||||
"> {1}/{0}.zst"
|
"{0} | zstd -T0 -c > {1}/{0}.zst"
|
||||||
.format(data['wo_db_name'],
|
.format(data['wo_db_name'],
|
||||||
backup_path)):
|
backup_path)):
|
||||||
Log.info(self,
|
Log.info(self,
|
||||||
"[" + Log.ENDC + Log.FAIL + "Fail" + Log.OKBLUE + "]")
|
"[" + Log.ENDC + Log.FAIL + "Fail" + Log.OKBLUE + "]")
|
||||||
raise SiteError("mysqldump failed to backup database")
|
raise SiteError("mysqldump failed to backup database")
|
||||||
|
|||||||
@@ -146,8 +146,18 @@ class WOStackController(CementBaseController):
|
|||||||
pargs.proftpd = True
|
pargs.proftpd = True
|
||||||
|
|
||||||
if pargs.web:
|
if pargs.web:
|
||||||
|
if self.app.config.has_section('php'):
|
||||||
|
config_php_ver = self.app.config.get(
|
||||||
|
'php', 'version')
|
||||||
|
if config_php_ver == '7.2':
|
||||||
|
pargs.php72 = True
|
||||||
|
elif config_php_ver == '7.3':
|
||||||
|
pargs.php73 = True
|
||||||
|
elif config_php_ver == '7.4':
|
||||||
|
pargs.php74 = True
|
||||||
|
else:
|
||||||
|
pargs.php74 = True
|
||||||
pargs.nginx = True
|
pargs.nginx = True
|
||||||
pargs.php73 = True
|
|
||||||
pargs.mysql = True
|
pargs.mysql = True
|
||||||
pargs.wpcli = True
|
pargs.wpcli = True
|
||||||
pargs.sendmail = True
|
pargs.sendmail = True
|
||||||
@@ -476,7 +486,7 @@ class WOStackController(CementBaseController):
|
|||||||
if not (WOAptGet.is_installed(self, 'php7.2-fpm') or
|
if not (WOAptGet.is_installed(self, 'php7.2-fpm') or
|
||||||
WOAptGet.is_installed(self, 'php7.3-fpm') or
|
WOAptGet.is_installed(self, 'php7.3-fpm') or
|
||||||
WOAptGet.is_installed(self, 'php7.4-fpm')):
|
WOAptGet.is_installed(self, 'php7.4-fpm')):
|
||||||
pargs.php = True
|
pargs.php74 = True
|
||||||
Log.debug(self, "Setting packages variable for utils")
|
Log.debug(self, "Setting packages variable for utils")
|
||||||
packages = packages + [[
|
packages = packages + [[
|
||||||
"https://raw.githubusercontent.com"
|
"https://raw.githubusercontent.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user