fix php extras with php73

This commit is contained in:
VirtuBox
2019-03-16 09:18:15 +01:00
parent 09e7c7dbfd
commit b9d5a20231
2 changed files with 17 additions and 5 deletions

View File

@@ -454,7 +454,7 @@ class WOSiteCreateController(CementBaseController):
# Check prompt # Check prompt
check_prompt = input("Type \"y\" to continue [n]:") check_prompt = input("Type \"y\" to continue [n]:")
if check_prompt != "Y" and check_prompt != "y": if check_prompt != "Y" and check_prompt != "y":
Log.info(self, "Not using PHP 7.2 for site.") Log.info(self, "Not using PHP 7.3 for site.")
data['php73'] = True data['php73'] = True
data['basic'] = True data['basic'] = True
php73 = 1 php73 = 1

View File

@@ -1183,7 +1183,10 @@ class WOStackController(CementBaseController):
if self.app.pargs.php: if self.app.pargs.php:
Log.debug(self, "Setting apt_packages variable for PHP 7.2") Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not (WOAptGet.is_installed(self, 'php7.2-fpm')): if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra if not (WOAptGet.is_installed(self, 'php7.3-fpm')):
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
else:
apt_packages = apt_packages + WOVariables.wo_php
else: else:
Log.debug(self, "PHP 7.2 already installed") Log.debug(self, "PHP 7.2 already installed")
Log.info(self, "PHP 7.2 already installed") Log.info(self, "PHP 7.2 already installed")
@@ -1192,7 +1195,10 @@ class WOStackController(CementBaseController):
if self.app.pargs.php73: if self.app.pargs.php73:
Log.debug(self, "Setting apt_packages variable for PHP 7.3") Log.debug(self, "Setting apt_packages variable for PHP 7.3")
if not WOAptGet.is_installed(self, 'php7.3-fpm'): if not WOAptGet.is_installed(self, 'php7.3-fpm'):
apt_packages = apt_packages + WOVariables.wo_php73 if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
else:
apt_packages = apt_packages + WOVariables.wo_php73
else: else:
Log.debug(self, "PHP 7.3 already installed") Log.debug(self, "PHP 7.3 already installed")
Log.info(self, "PHP 7.3 already installed") Log.info(self, "PHP 7.3 already installed")
@@ -1398,7 +1404,10 @@ class WOStackController(CementBaseController):
if self.app.pargs.php73: if self.app.pargs.php73:
Log.debug(self, "Removing apt_packages variable of PHP 7.3") Log.debug(self, "Removing apt_packages variable of PHP 7.3")
if not WOAptGet.is_installed(self, 'php7.3-fpm'): if not WOAptGet.is_installed(self, 'php7.3-fpm'):
apt_packages = apt_packages + WOVariables.wo_php73 if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
else:
apt_packages = apt_packages + WOVariables.wo_php73
# REDIS # REDIS
if self.app.pargs.redis: if self.app.pargs.redis:
@@ -1534,7 +1543,10 @@ class WOStackController(CementBaseController):
if self.app.pargs.php73: if self.app.pargs.php73:
Log.debug(self, "Removing apt_packages variable of PHP 7.3") Log.debug(self, "Removing apt_packages variable of PHP 7.3")
if not WOAptGet.is_installed(self, 'php7.3-fpm'): if not WOAptGet.is_installed(self, 'php7.3-fpm'):
apt_packages = apt_packages + WOVariables.wo_php73 if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
else:
apt_packages = apt_packages + WOVariables.wo_php73
else: else:
Log.error(self, "Cannot Purge PHP 7.3. not found.") Log.error(self, "Cannot Purge PHP 7.3. not found.")
# WP-CLI # WP-CLI