Almost there, don't use this yet

This commit is contained in:
jeroenlaylo
2018-11-30 18:54:42 +01:00
parent d8a570018a
commit 2788f3169d
5 changed files with 88 additions and 109 deletions

View File

@@ -713,33 +713,17 @@ def site_package_check(self, stype):
if not self.app.pargs.php7 and stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for PHP")
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
else:
if not WOAptGet.is_installed(self, 'php5-fpm'):
apt_packages = apt_packages + WOVariables.wo_php
apt_packages = apt_packages + WOVariables.wo_php72 + WOVariables.wo_php_extra
if self.app.pargs.php7 and stype in [ 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
apt_packages = apt_packages + WOVariables.wo_php72 + WOVariables.wo_php_extra
else:
if WOVariables.wo_platform_codename == 'wheezy':
Log.warn(self, "PHP 7.0 not available for your system.")
Log.info(self,"Creating site with PHP 5.6")
if not WOAptGet.is_installed(self, 'php5-fpm'):
Log.info(self, "Setting apt_packages variable for PHP")
Log.debug(self, "Setting apt_packages variable for PHP")
apt_packages = apt_packages + WOVariables.wo_php
else:
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
apt_packages = apt_packages + WOVariables.wo_php7_2
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
apt_packages = apt_packages + WOVariables.wo_php72
if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for MySQL")
@@ -851,8 +835,8 @@ def site_package_check(self, stype):
Log.error(self,"PHP 7.0 is not supported in your Platform")
Log.debug(self, "Setting apt_packages variable for PHP 7.0")
if not WOAptGet.is_installed(self, 'php7.0-fpm'):
apt_packages = apt_packages + WOVariables.wo_php7_2 + WOVariables.wo_php_extra
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
apt_packages = apt_packages + WOVariables.wo_php72 + WOVariables.wo_php_extra
if os.path.isdir("/etc/nginx/common") and (not
os.path.isfile("/etc/nginx/common/php7.conf")):